mirror of
https://github.com/electron/electron.git
synced 2026-02-17 10:31:38 -05:00
* chore: bump node in DEPS to v12.16.0 * Fixup asar support setup patch https://github.com/nodejs/node/pull/30862 * Fixup InternalCallbackScope patch https://github.com/nodejs/node/pull/30236 * Fixup GN buildfiles patch https://github.com/nodejs/node/pull/30755 * Fixup low-level hooks patch https://github.com/nodejs/node/pull/30466 * Fixup globals require patch https://github.com/nodejs/node/pull/31643 * Fixup process stream patch https://github.com/nodejs/node/pull/30862 * Fixup js2c modification patch https://github.com/nodejs/node/pull/30755 * Fixup internal fs override patch https://github.com/nodejs/node/pull/30610 * Fixup context-aware warn patch https://github.com/nodejs/node/pull/30336 * Fixup Node.js with ltcg config https://github.com/nodejs/node/pull/29388 * Fixup oaepLabel patch https://github.com/nodejs/node/pull/30917 * Remove redundant ESM test patch https://github.com/nodejs/node/pull/30997 * Remove redundant cli flag patch https://github.com/nodejs/node/pull/30466 * Update filenames.json * Remove macro generation in GN build files https://github.com/nodejs/node/pull/30755 * Fix some compilation errors upstream * Add uvwasi to deps https://github.com/nodejs/node/pull/30258 * Fix BoringSSL incompatibilities * Fixup linked module patch https://github.com/nodejs/node/pull/30274 * Add missing sources to GN uv build https://github.com/libuv/libuv/pull/2347 * Patch some uvwasi incompatibilities * chore: bump Node.js to v12.6.1 * Remove mark_arraybuffer_as_untransferable.patch https://github.com/nodejs/node/pull/30549 * Fix uvwasi build failure on win * Fixup --perf-prof cli option error * Fixup early cjs module loading * fix: initialize diagnostics properly https://github.com/nodejs/node/pull/30025 * Disable new esm syntax specs https://github.com/nodejs/node/pull/30219 * Fixup v8 weakref hook spec https://github.com/nodejs/node/pull/29874 * Fix async context timer issue * Disable monkey-patch-main spec It relies on https://github.com/nodejs/node/pull/29777, and we don't override prepareStackTrace. * Disable new tls specs https://github.com/nodejs/node/pull/23188 We don't support much of TLS owing to schisms between BoringSSL and OpenSSL. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shelley Vohr <shelley.vohr@gmail.com>
|
|
Date: Thu, 20 Feb 2020 19:04:18 -0800
|
|
Subject: fix: we need to eager-load cjs modules
|
|
|
|
Node.js added a check to prevent commonjs modules being loaded before prepareMainThreadExecution,
|
|
but Electron needs to do that in our asar logic in order to override child_process. I plan to
|
|
either tweak this logic and upstream it to Nodejs, or to find an alternate approach in Electron
|
|
for overriding the child_process apis.
|
|
|
|
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
|
|
index 35ad9ee1a685177894bb5c13c58c16af2ccee362..865ade2b6917321e16ef3b5f12121e8bfcc25b07 100644
|
|
--- a/lib/internal/bootstrap/pre_execution.js
|
|
+++ b/lib/internal/bootstrap/pre_execution.js
|
|
@@ -64,7 +64,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
|
|
initializeESMLoader();
|
|
|
|
const CJSLoader = require('internal/modules/cjs/loader');
|
|
- assert(!CJSLoader.hasLoadedAnyUserCJSModule);
|
|
+ // assert(!CJSLoader.hasLoadedAnyUserCJSModule);
|
|
loadPreloadModules();
|
|
initializeFrozenIntrinsics();
|
|
setupAsarSupport();
|
|
diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js
|
|
index 56ccd9df5e9b539297856a31691f577a5ab56bf0..abc1efcef3822c84f5f70ed64e1e9a80a16be98c 100644
|
|
--- a/lib/internal/main/worker_thread.js
|
|
+++ b/lib/internal/main/worker_thread.js
|
|
@@ -115,7 +115,7 @@ port.on('message', (message) => {
|
|
initializeESMLoader();
|
|
|
|
const CJSLoader = require('internal/modules/cjs/loader');
|
|
- assert(!CJSLoader.hasLoadedAnyUserCJSModule);
|
|
+ // assert(!CJSLoader.hasLoadedAnyUserCJSModule);
|
|
loadPreloadModules();
|
|
initializeFrozenIntrinsics();
|
|
if (argv !== undefined) {
|