@@ -5,26 +5,26 @@ Subject: feat: initialize asar support
55
66This patch initializes asar support in Node.js.
77
8- diff --git a/lib/internal/bootstrap /pre_execution.js b/lib/internal/bootstrap /pre_execution.js
9- index 337b95133bc94e395229211c9a00a055b279fcc9..25a8464e4833ff4655db2fe37f4bd482dc147865 100644
10- --- a/lib/internal/bootstrap /pre_execution.js
11- +++ b/lib/internal/bootstrap /pre_execution.js
12- @@ -94,6 +94,7 @@ function prepareMainThreadExecution(expandArgv1 = false,
8+ diff --git a/lib/internal/process /pre_execution.js b/lib/internal/process /pre_execution.js
9+ index 23d4dbcf6cd8e1e3e4a509672e203323d81e736c..a951a526a1901ec8d83f63df5de8c8f3ed732667 100644
10+ --- a/lib/internal/process /pre_execution.js
11+ +++ b/lib/internal/process /pre_execution.js
12+ @@ -103,12 +103,17 @@ function prepareMainThreadExecution(expandArgv1 = false,
1313 assert(!CJSLoader.hasLoadedAnyUserCJSModule);
1414 loadPreloadModules();
1515 initializeFrozenIntrinsics();
1616+ setupAsarSupport();
1717 }
1818
1919 function refreshRuntimeOptions() {
20- @@ -584,6 +585,10 @@ function loadPreloadModules() {
21- }
20+ refreshOptions();
2221 }
2322
2423+ function setupAsarSupport() {
2524+ process._linkedBinding('electron_common_asar').initAsarSupport(require);
2625+ }
2726+
28- module.exports = {
29- refreshRuntimeOptions,
30- patchProcessObject,
27+ function patchProcessObject(expandArgv1) {
28+ const binding = internalBinding('process_methods');
29+ binding.patchProcessObject(process);
30+
0 commit comments