39baf68790
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
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 1b05d6e30a0ba004ac3c1113da3ad649a6e74dcc..cef4e5086ca8160a7d715915f735963e369068b1 100644
|
|
--- a/lib/internal/bootstrap/pre_execution.js
|
|
+++ b/lib/internal/bootstrap/pre_execution.js
|
|
@@ -67,6 +67,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
|
|
assert(!CJSLoader.hasLoadedAnyUserCJSModule);
|
|
loadPreloadModules();
|
|
initializeFrozenIntrinsics();
|
|
+ setupAsarSupport();
|
|
}
|
|
|
|
function patchProcessObject(expandArgv1) {
|
|
@@ -445,6 +446,10 @@ function loadPreloadModules() {
|
|
}
|
|
}
|
|
|
|
+function setupAsarSupport() {
|
|
+ process._linkedBinding('electron_common_asar').initAsarSupport(require);
|
|
+}
|
|
+
|
|
module.exports = {
|
|
patchProcessObject,
|
|
setupCoverageHooks,
|