From 76b8ecbb6d8c07d29c34fb0b301cc3bf3351e3aa Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Fri, 19 Jul 2024 12:37:08 +0900 Subject: fix(ext/node): do not expose `self` global in node (#24637) closes #23727 --- ext/node/polyfills/worker_threads.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node/polyfills') diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts index 8bbd0e929..b51049af5 100644 --- a/ext/node/polyfills/worker_threads.ts +++ b/ext/node/polyfills/worker_threads.ts @@ -356,7 +356,7 @@ internals.__initWorkerThreads = ( (ev: any) => any >(); - parentPort = self as ParentPort; + parentPort = globalThis as ParentPort; threadId = workerId; if (maybeWorkerMetadata) { const { 0: metadata, 1: _ } = maybeWorkerMetadata; -- cgit v1.2.3