summaryrefslogtreecommitdiff
path: root/ext/broadcast_channel
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-02-01 18:06:11 +0100
committerGitHub <noreply@github.com>2022-02-01 18:06:11 +0100
commit8176a4d1663529fb8aeebf7734c4994fa1d583f4 (patch)
tree94c7d6eb2679e641f59cf78640340f5b7af0022e /ext/broadcast_channel
parentabf89f8c4675ed78c992fafd6d758bf4bfca8a1a (diff)
refactor: primordials for instanceof (#13527)
Diffstat (limited to 'ext/broadcast_channel')
-rw-r--r--ext/broadcast_channel/01_broadcast_channel.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/broadcast_channel/01_broadcast_channel.js b/ext/broadcast_channel/01_broadcast_channel.js
index d89b19a1b..dad94860d 100644
--- a/ext/broadcast_channel/01_broadcast_channel.js
+++ b/ext/broadcast_channel/01_broadcast_channel.js
@@ -98,7 +98,7 @@
}
postMessage(message) {
- webidl.assertBranded(this, BroadcastChannel);
+ webidl.assertBranded(this, BroadcastChannelPrototype);
const prefix = "Failed to execute 'postMessage' on 'BroadcastChannel'";
webidl.requiredArguments(arguments.length, 1, { prefix });
@@ -121,7 +121,7 @@
}
close() {
- webidl.assertBranded(this, BroadcastChannel);
+ webidl.assertBranded(this, BroadcastChannelPrototype);
this[_closed] = true;
const index = ArrayPrototypeIndexOf(channels, this);
@@ -134,6 +134,7 @@
defineEventHandler(BroadcastChannel.prototype, "message");
defineEventHandler(BroadcastChannel.prototype, "messageerror");
+ const BroadcastChannelPrototype = BroadcastChannel.prototype;
window.__bootstrap.broadcastChannel = { BroadcastChannel };
})(this);