summaryrefslogtreecommitdiff
path: root/ext/web/13_message_port.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-04-03 02:41:41 +0900
committerGitHub <noreply@github.com>2023-04-02 19:41:41 +0200
commit03edd48edd004cec091541e6b71095cfbc4b4c87 (patch)
tree72aed1dae803334b73479ffebc7ca8c83d10addf /ext/web/13_message_port.js
parentad8d0c90d1887beb8a5f2c6d30f9dc71cc63e4fe (diff)
chore: Turn back on dlintPreferPrimordials (#17715)
Closes #17709
Diffstat (limited to 'ext/web/13_message_port.js')
-rw-r--r--ext/web/13_message_port.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/web/13_message_port.js b/ext/web/13_message_port.js
index f50d14d1a..6227bf92b 100644
--- a/ext/web/13_message_port.js
+++ b/ext/web/13_message_port.js
@@ -19,6 +19,7 @@ import DOMException from "ext:deno_web/01_dom_exception.js";
const primordials = globalThis.__bootstrap.primordials;
const {
ArrayBufferPrototype,
+ ArrayBufferPrototypeGetByteLength,
ArrayPrototypeFilter,
ArrayPrototypeIncludes,
ArrayPrototypePush,
@@ -249,7 +250,10 @@ function serializeJsMessageData(data, transferables) {
for (let i = 0, j = 0; i < transferables.length; i++) {
const ab = transferables[i];
if (ObjectPrototypeIsPrototypeOf(ArrayBufferPrototype, ab)) {
- if (ab.byteLength === 0 && ops.op_arraybuffer_was_detached(ab)) {
+ if (
+ ArrayBufferPrototypeGetByteLength(ab) === 0 &&
+ ops.op_arraybuffer_was_detached(ab)
+ ) {
throw new DOMException(
`ArrayBuffer at index ${j} is already detached`,
"DataCloneError",