@@ -5,26 +5,26 @@ Subject: feat: initialize asar support
5
5
6
6
This patch initializes asar support in Node.js.
7
7
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,
13
13
assert(!CJSLoader.hasLoadedAnyUserCJSModule);
14
14
loadPreloadModules();
15
15
initializeFrozenIntrinsics();
16
16
+ setupAsarSupport();
17
17
}
18
18
19
19
function refreshRuntimeOptions() {
20
- @@ -584,6 +585,10 @@ function loadPreloadModules() {
21
- }
20
+ refreshOptions();
22
21
}
23
22
24
23
+ function setupAsarSupport() {
25
24
+ process._linkedBinding('electron_common_asar').initAsarSupport(require);
26
25
+ }
27
26
+
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