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 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,