2019-07-16 17:23:04 +00:00
|
|
|
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
|
|
|
|
|
2020-02-24 21:02:04 +00:00
|
|
|
This patch initializes asar support in Node.js.
|
2019-07-16 17:23:04 +00:00
|
|
|
|
|
|
|
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
|
2022-03-23 22:59:54 +00:00
|
|
|
index f21ba048b4863863e6c7b740f410775776a7649a..3c5e6fe40070f52d8b3f4e9757485845c1d6dbed 100644
|
2019-07-16 17:23:04 +00:00
|
|
|
--- a/lib/internal/bootstrap/pre_execution.js
|
|
|
|
+++ b/lib/internal/bootstrap/pre_execution.js
|
2021-12-16 22:41:25 +00:00
|
|
|
@@ -76,6 +76,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
|
2020-02-24 21:02:04 +00:00
|
|
|
assert(!CJSLoader.hasLoadedAnyUserCJSModule);
|
2019-07-16 17:23:04 +00:00
|
|
|
loadPreloadModules();
|
2019-10-14 22:46:10 +00:00
|
|
|
initializeFrozenIntrinsics();
|
2019-07-16 17:23:04 +00:00
|
|
|
+ setupAsarSupport();
|
|
|
|
}
|
|
|
|
|
|
|
|
function patchProcessObject(expandArgv1) {
|
2022-03-23 22:59:54 +00:00
|
|
|
@@ -477,6 +478,10 @@ function loadPreloadModules() {
|
2019-07-16 17:23:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+function setupAsarSupport() {
|
2020-02-14 11:25:39 +00:00
|
|
|
+ process._linkedBinding('electron_common_asar').initAsarSupport(require);
|
2019-07-16 17:23:04 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
module.exports = {
|
|
|
|
patchProcessObject,
|
|
|
|
setupCoverageHooks,
|