Skip to content

Commit

Permalink
Editorial: Don't use SameValue in DetachArrayBuffer (#2745)
Browse files Browse the repository at this point in the history
SameValue accepts only ECMAScript language values as args,
so DetachArrayBuffer's use of SameValue asserts that
detach keys are ECMAScript language values.
But detach keys should be as opaque as possible,
so replace `SameValue` with `is`.
  • Loading branch information
jmdyck authored and ljharb committed Sep 23, 2022
1 parent 9a5b72b commit 3efc1cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -40848,7 +40848,7 @@ <h1>
<emu-alg>
1. Assert: IsSharedArrayBuffer(_arrayBuffer_) is *false*.
1. If _key_ is not present, set _key_ to *undefined*.
1. If SameValue(_arrayBuffer_.[[ArrayBufferDetachKey]], _key_) is *false*, throw a *TypeError* exception.
1. If _arrayBuffer_.[[ArrayBufferDetachKey]] is not _key_, throw a *TypeError* exception.
1. Set _arrayBuffer_.[[ArrayBufferData]] to *null*.
1. Set _arrayBuffer_.[[ArrayBufferByteLength]] to 0.
1. Return ~unused~.
Expand Down

0 comments on commit 3efc1cc

Please sign in to comment.