Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw, instead of assert, for transferring detached ArrayBuffers #1420

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -9060,7 +9060,8 @@ a reference to the same object that the IDL value represents.

1. Let |jsArrayBuffer| be the result of [=converted to a JavaScript value|converting=]
|arrayBuffer| to a JavaScript value.
1. Assert: [$IsDetachedBuffer$](|jsArrayBuffer|) is false.
1. If [$IsDetachedBuffer$](|jsArrayBuffer|) is false, then [=JavaScript/throw=] a
<l spec=ecmascript>{{TypeError}}</l>.
1. Let |arrayBufferData| be |jsArrayBuffer|.\[[ArrayBufferData]].
1. Let |arrayBufferByteLength| be |jsArrayBuffer|.\[[ArrayBufferByteLength]].
1. Perform [=?=] [$DetachArrayBuffer$](|jsArrayBuffer|).
Expand All @@ -9073,7 +9074,8 @@ a reference to the same object that the IDL value represents.
value of type {{ArrayBuffer}}.

<p class="note">This will throw an exception under the same circumstances as
[=ArrayBuffer/detaching=].
[=ArrayBuffer/detaching=], and also for {{ArrayBuffer}}s that are already
[=BufferSource/detached=].
</div>

<h4 id="js-frozen-array" oldids="es-frozen-array">Frozen arrays — FrozenArray&lt;|T|&gt;</h4>
Expand Down
Loading