summaryrefslogtreecommitdiff
path: root/ext/broadcast_channel/01_broadcast_channel.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-27 13:36:36 +0100
committerGitHub <noreply@github.com>2022-01-27 13:36:36 +0100
commit884143218fad0e18f7553aaf079d52de703f7601 (patch)
tree9b9e9d30ea647041438ef8fa974b8d4234cabf73 /ext/broadcast_channel/01_broadcast_channel.js
parentdcf8f144ab0516936bfa4e93357d71f1732d880e (diff)
refactor: update runtime code for primordial checks for "instanceof" (#13497)
Diffstat (limited to 'ext/broadcast_channel/01_broadcast_channel.js')
-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);