From 8176a4d1663529fb8aeebf7734c4994fa1d583f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 1 Feb 2022 18:06:11 +0100 Subject: refactor: primordials for instanceof (#13527) --- ext/broadcast_channel/01_broadcast_channel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/broadcast_channel') 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); -- cgit v1.2.3