From 04dad9c2f6c6fa9cd5efe26e602c05a2d3815035 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 1 Mar 2023 13:25:20 +0100 Subject: [PATCH] lib: fix BroadcastChannel initialization location PR-URL: https://github.com/nodejs/node/pull/46864 Reviewed-By: Joyee Cheung Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca Reviewed-By: Chengzhong Wu --- lib/internal/bootstrap/browser.js | 1 + lib/internal/bootstrap/node.js | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/internal/bootstrap/browser.js b/lib/internal/bootstrap/browser.js index bffdadbe84ea44..29932e9b5d8ef0 100644 --- a/lib/internal/bootstrap/browser.js +++ b/lib/internal/bootstrap/browser.js @@ -43,6 +43,7 @@ defineOperation(globalThis, 'setInterval', timers.setInterval); defineOperation(globalThis, 'setTimeout', timers.setTimeout); // Lazy ones. +exposeLazyInterfaces(globalThis, 'internal/worker/io', ['BroadcastChannel']); exposeLazyInterfaces(globalThis, 'internal/abort_controller', [ 'AbortController', 'AbortSignal', ]); diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 161f75284d33dc..f73f10fc3c3692 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -71,7 +71,6 @@ const { defineOperation, deprecate, defineLazyProperties, - exposeLazyInterfaces, } = require('internal/util'); const { privateSymbols: { @@ -247,11 +246,6 @@ defineLazyProperties( ['structuredClone'], ); -exposeLazyInterfaces( - globalThis, - 'internal/worker/io', - ['BroadcastChannel'], -); // Set the per-Environment callback that will be called // when the TrackingTraceStateObserver updates trace state. // Note that when NODE_USE_V8_PLATFORM is true, the observer is