diff options
Diffstat (limited to 'ext/broadcast_channel/01_broadcast_channel.js')
-rw-r--r-- | ext/broadcast_channel/01_broadcast_channel.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/broadcast_channel/01_broadcast_channel.js b/ext/broadcast_channel/01_broadcast_channel.js index cf3b17ac5..59c6b7cef 100644 --- a/ext/broadcast_channel/01_broadcast_channel.js +++ b/ext/broadcast_channel/01_broadcast_channel.js @@ -122,7 +122,11 @@ dispatch(this, this[_name], new Uint8Array(data)); // Send to listeners in other VMs. - defer(() => core.opAsync("op_broadcast_send", rid, this[_name], data)); + defer(() => { + if (!this[_closed]) { + core.opAsync("op_broadcast_send", rid, this[_name], data); + } + }); } close() { |