From 48aa48ec8d22a5f088f897e80b8988af0de28a75 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 27 Feb 2023 13:09:42 +0100 Subject: [PATCH] lib: fix BroadcastChannel initialization location --- 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 b94ac9891a399c..2489e727d91dea 100644 --- a/lib/internal/bootstrap/browser.js +++ b/lib/internal/bootstrap/browser.js @@ -39,6 +39,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 5bdbe4effc76cb..1c25ee5f910918 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -72,7 +72,6 @@ const { defineOperation, deprecate, defineLazyProperties, - exposeLazyInterfaces, } = require('internal/util'); const { validateInteger, @@ -226,11 +225,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