electron/patches/node/fixme_use_redefined_version_of_internalmodulestat.patch
Electron Bot 39baf68790
chore: bump chromium to 5b340c815ce15ab2efcf277ed19e9 (master) (#22064)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: loc <andy@slack-corp.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-03-03 13:35:05 -08:00

23 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 21 Aug 2019 11:06:16 -0700
Subject: FIXME: use redefined version of internalModuleStat
Instantiate redefined version of the internalModuleStat function
(see lib/common/asar.js in the electron/electron repo). For some reason
this has to be done after the upgrade to the Node.js v8.7.0. in the very beginning of the file holds a reference
to a native Node.js implementation of the function.
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 5300f6e6f6724de2bbfe42270a39f9123a3fd071..237b507df13497297ea00b7c2e0060333c3595c0 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -138,6 +138,8 @@ function enrichCJSError(err) {
}
function stat(filename) {
+ // FIXME(codebytere): determine why this needs to be done and remove
+ const internalModuleStat = process.binding('fs').internalModuleStat;
filename = path.toNamespacedPath(filename);
if (statCache !== null) {
const result = statCache.get(filename);