electron/patches/node/feat_initialize_asar_support.patch
electron-roller[bot] fb990ba1eb
chore: bump node to v16.7.0 (main) (#30350)
* chore: bump node in DEPS to v16.6.0

* chore: bump node in DEPS to v16.6.1

* crypto: fix generateKeyPair with encoding 'jwk'

https://github.com/nodejs/node/pull/39319

* build: add library_files to gyp variables

https://github.com/nodejs/node/pull/39293

* debugger: rename internal module

https://github.com/nodejs/node/pull/39378

* chore: fixup patch indices

* deps: extract gtest source files to deps/googletest

https://github.com/nodejs/node/pull/39386

* crypto: fix generateKeyPair with encoding 'jwk'

https://github.com/nodejs/node/pull/39319

* deps: bump HdrHistogram_C to 0.11.2

https://github.com/nodejs/node/pull/39462

* fixup! deps: extract gtest source files to deps/googletest

* chore: bump node in DEPS to v16.6.2

* chore: update patches

* deps: reflect c-ares source tree

https://github.com/nodejs/node/pull/39653

* deps: update c-ares to 1.17.2

https://github.com/nodejs/node/pull/39724

* fix: _ReadBarrier undefined symbol error on WOA arm64

* chore: update patches

* chore: bump node in DEPS to v16.7.0

* deps: upgrade to libuv 1.42.0

https://github.com/nodejs/node/pull/39525

* chore: update filenames

* src: remove extra semicolons outside fns

* chore: fixup patch filenames

* chore: sort and alphabetize disabled tests

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2021-08-20 19:25:50 +02:00

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 0906b35edc5ff38fb7730eba9cebcc0e472fe56c..076eb528af016b9143985685bc6d1e7c14fa80e6 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -76,6 +76,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
assert(!CJSLoader.hasLoadedAnyUserCJSModule);
loadPreloadModules();
initializeFrozenIntrinsics();
+ setupAsarSupport();
}
function patchProcessObject(expandArgv1) {
@@ -482,6 +483,10 @@ function loadPreloadModules() {
}
}
+function setupAsarSupport() {
+ process._linkedBinding('electron_common_asar').initAsarSupport(require);
+}
+
module.exports = {
patchProcessObject,
setupCoverageHooks,