summaryrefslogtreecommitdiff
path: root/ext/web/13_message_port.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2022-12-20 11:37:50 +0900
committerGitHub <noreply@github.com>2022-12-20 03:37:50 +0100
commit948f85216a15e4ef489af21bb532a9b201b0364c (patch)
tree35c2bbfa021cf9a4190ab803ed091c5547bfe9f4 /ext/web/13_message_port.js
parent2ac575abfb75dc4533306c80240cb1beeb816b9b (diff)
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
Diffstat (limited to 'ext/web/13_message_port.js')
-rw-r--r--ext/web/13_message_port.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/web/13_message_port.js b/ext/web/13_message_port.js
index 7343fbe58..7ec8dc9f9 100644
--- a/ext/web/13_message_port.js
+++ b/ext/web/13_message_port.js
@@ -22,6 +22,7 @@
ArrayPrototypePush,
ObjectPrototypeIsPrototypeOf,
ObjectSetPrototypeOf,
+ SafeArrayIterator,
Symbol,
SymbolFor,
SymbolIterator,
@@ -204,7 +205,9 @@
const arrayBufferIdsInTransferables = [];
const transferredArrayBuffers = [];
- for (const transferable of messageData.transferables) {
+ for (
+ const transferable of new SafeArrayIterator(messageData.transferables)
+ ) {
switch (transferable.kind) {
case "messagePort": {
const port = createMessagePort(transferable.data);
@@ -271,7 +274,7 @@
const serializedTransferables = [];
let arrayBufferI = 0;
- for (const transferable of transferables) {
+ for (const transferable of new SafeArrayIterator(transferables)) {
if (ObjectPrototypeIsPrototypeOf(MessagePortPrototype, transferable)) {
webidl.assertBranded(transferable, MessagePortPrototype);
const id = transferable[_id];