diff --git a/patches/node/.patches b/patches/node/.patches index 9eb25649cb862..33ca74ca42820 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -27,7 +27,6 @@ fix_use_crypto_impls_for_compat.patch fix_window_c-ares_incompatibilities.patch fix_comment_out_incompatible_crypto_modules.patch update_tests_after_increasing_typed_array_size.patch -fix_do_not_register_the_esm_loader_in_renderer_processes.patch fix_allow_preventing_setpromiserejectcallback.patch lib_use_non-symbols_in_isurlinstance_check.patch feat_add_implementation_of_v8_platform_postjob.patch diff --git a/patches/node/fix_do_not_register_the_esm_loader_in_renderer_processes.patch b/patches/node/fix_do_not_register_the_esm_loader_in_renderer_processes.patch deleted file mode 100644 index 5dd6c2e95761d..0000000000000 --- a/patches/node/fix_do_not_register_the_esm_loader_in_renderer_processes.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Thu, 25 Jun 2020 09:29:04 -0700 -Subject: fix: do not register the ESM loader in renderer processes - -Only one ESM loader can be registered per isolate, in renderer processes this should be blink. This patches node so that it won't register it's handler (overriding blinks) in non-browser processes. - -This has been upstreamed in: - * https://github.com/nodejs/node/pull/34060 - * https://github.com/nodejs/node/pull/34127 - -We can't easily rebase on that accepted solution here but we can as soon as we upgrade to -Node.js v14, since we need to leverage the new version of node::CreateEnvironment -introduced in https://github.com/nodejs/node/pull/30467. - -diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js -index b4a0f71af5853f427a10449b52509052fbe3facd..ba5b0b6e51bcddbc5b9dd9c31231585d61b131a0 100644 ---- a/lib/internal/bootstrap/pre_execution.js -+++ b/lib/internal/bootstrap/pre_execution.js -@@ -411,6 +411,9 @@ function initializeESMLoader() { - // Create this WeakMap in js-land because V8 has no C++ API for WeakMap. - internalBinding('module_wrap').callbackMap = new SafeWeakMap(); - -+ // Do not hook the ESM loader in renderer processes as it overrides blinks loader -+ if (typeof process.type === 'string' && process.type !== 'browser') return; -+ - const { - setImportModuleDynamicallyCallback, - setInitializeImportMetaObjectCallback