electron/patches/node/feat_initialize_asar_support.patch
electron-roller[bot] e61728beb9
chore: bump node to v18.15.0 (main) (#37532)
* chore: bump node in DEPS to v18.15.0

* chore: update patches

* chore: update node filenames patch

* chore: re-enable parallel/test-intl

* chore: disable parallel/test-webcrypto-wrap-unwrap

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2023-03-13 09:51:03 -04:00

29 lines
1,013 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/process/pre_execution.js b/lib/internal/process/pre_execution.js
index 44a9183d77614c55246a513ec8d47c3f5ec6e41b..158daaf93446d99d21dd001a3ab614b1036c0b02 100644
--- a/lib/internal/process/pre_execution.js
+++ b/lib/internal/process/pre_execution.js
@@ -118,12 +118,17 @@ function setupUserModules() {
loadPreloadModules();
// Need to be done after --require setup.
initializeFrozenIntrinsics();
+ setupAsarSupport();
}
function refreshRuntimeOptions() {
refreshOptions();
}
+function setupAsarSupport() {
+ process._linkedBinding('electron_common_asar').initAsarSupport(require);
+}
+
function patchProcessObject(expandArgv1) {
const binding = internalBinding('process_methods');
binding.patchProcessObject(process);