This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28797 - Use IsDetachedBuffer() for BufferSource types consistently
Summary: Use IsDetachedBuffer() for BufferSource types consistently
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-11 17:52 UTC by Anne
Modified: 2015-07-07 08:07 UTC (History)
2 users (show)

See Also:


Attachments

Description Anne 2015-06-11 17:52:13 UTC
http://heycam.github.io/webidl/#es-to-buffer-source

[[
V does not have an [[ArrayBufferData]] internal slot
]]

We should use IsDetachedBuffer instead as is already done elsewhere.
Comment 2 Anne 2015-07-07 06:50:58 UTC
You forgot to remove the [[ArrayBufferData]] check. See http://ecma-international.org/ecma-262/6.0/#sec-isdetachedbuffer in particular.
Comment 3 Cameron McCormack 2015-07-07 07:22:54 UTC
IsDetachedBuffer asserts that [[ArrayBufferData]] exists, rather than checks-and-throws if it does not exist. So I think callers of IsDetachedBuffer need to ensure that the value passed to it is already an object with an [[ArrayBufferData]].
Comment 4 Anne 2015-07-07 08:07:02 UTC
My bad.