From 5f753527b33d88990989928cea18d37d0a3eba9d Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 10 Jan 2024 14:38:02 +0100 Subject: [PATCH] module: bootstrap module loaders in shadow realm https://github.com/nodejs/node/pull/48655 --- patches/node/feat_initialize_asar_support.patch | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/patches/node/feat_initialize_asar_support.patch b/patches/node/feat_initialize_asar_support.patch index 5f83a12323be3..33ae71f361186 100644 --- a/patches/node/feat_initialize_asar_support.patch +++ b/patches/node/feat_initialize_asar_support.patch @@ -6,20 +6,19 @@ Subject: feat: initialize asar support This patch initializes asar support in Node.js. diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js -index 917ba90a1c8bbbff5d86e5f2079d1ce67237280e..66dfd7c1e521f38691e4656ac7ab0572a2fe75da 100644 +index 9142fed75e9050fcc17c01208e82f1bc57923fcd..fc8f61ee6d30cf18951ec7a5eb5f09a9583a85ae 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js -@@ -67,6 +67,8 @@ function prepareWorkerThreadExecution() { +@@ -87,6 +87,7 @@ function prepareShadowRealmExecution() { }); } -+ +let processLinkedBinding = process._linkedBinding; function prepareExecution(options) { const { expandArgv1, initializeModules, isMainThread } = options; -@@ -172,12 +174,17 @@ function setupUserModules(isLoaderWorker = false) { - loadPreloadModules(); +@@ -193,12 +194,17 @@ function setupUserModules(forceDefaultLoader = false) { + } // Need to be done after --require setup. initializeFrozenIntrinsics(); + setupAsarSupport();