From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shelley Vohr 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 a4c73cba5481b3005474742483a554c93358c4e1..9d2799c3c9ac3b216c2289ae4e037dd228844d23 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -77,6 +77,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { assert(!CJSLoader.hasLoadedAnyUserCJSModule); loadPreloadModules(); initializeFrozenIntrinsics(); + setupAsarSupport(); } function patchProcessObject(expandArgv1) { @@ -485,6 +486,10 @@ function loadPreloadModules() { } } +function setupAsarSupport() { + process._linkedBinding('electron_common_asar').initAsarSupport(require); +} + module.exports = { patchProcessObject, setupCoverageHooks,