8f9058ea72
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
30 lines
1,022 B
Diff
30 lines
1,022 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shelley Vohr <shelley.vohr@gmail.com>
|
|
Date: Thu, 13 Sep 2018 08:56:07 -0700
|
|
Subject: feat: initialize asar support
|
|
|
|
This patch initializes asar support in Node.js.
|
|
|
|
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
|
|
index c76add4621b614dd7dd4f4d369fb6ce7598ee22d..af69dfc9e71b54a9d7eda0daa498396008aba610 100644
|
|
--- a/lib/internal/bootstrap/pre_execution.js
|
|
+++ b/lib/internal/bootstrap/pre_execution.js
|
|
@@ -75,6 +75,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
|
|
assert(!CJSLoader.hasLoadedAnyUserCJSModule);
|
|
loadPreloadModules();
|
|
initializeFrozenIntrinsics();
|
|
+ setupAsarSupport();
|
|
}
|
|
|
|
function patchProcessObject(expandArgv1) {
|
|
@@ -450,6 +451,10 @@ function loadPreloadModules() {
|
|
}
|
|
}
|
|
|
|
+function setupAsarSupport() {
|
|
+ process._linkedBinding('electron_common_asar').initAsarSupport(require);
|
|
+}
|
|
+
|
|
module.exports = {
|
|
patchProcessObject,
|
|
setupCoverageHooks,
|