Skip to content

Commit

Permalink
Fixup globals require patch
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Feb 15, 2020
1 parent 85fdd3f commit d46b459
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions patches/node/pass_all_globals_through_require.patch
Expand Up @@ -6,10 +6,10 @@ Subject: Pass all globals through "require"
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)

diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 4bd467849ccf98ba17e0f4615d1df5febf878173..112a35280391ac85665f119ded9c78e88f868542 100644
index 7b1c1c5f16e6cc68be6a7188572c0a502ba73148..0265ce3f06405d4df5128ce1918be228d6eaa451 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -83,6 +83,13 @@ const {
@@ -101,6 +101,13 @@ const {
CHAR_COLON
} = require('internal/constants');

Expand All @@ -22,19 +22,19 @@ index 4bd467849ccf98ba17e0f4615d1df5febf878173..112a35280391ac85665f119ded9c78e8
+
const isWindows = process.platform === 'win32';

const relativeResolveCache = Object.create(null);
@@ -950,10 +957,12 @@ Module.prototype._compile = function(content, filename) {
const relativeResolveCache = ObjectCreate(null);
@@ -1152,10 +1159,12 @@ Module.prototype._compile = function(content, filename) {
if (requireDepth === 0) statCache = new Map();
if (inspectorWrapper) {
result = inspectorWrapper(compiledWrapper, thisValue, exports,
- require, module, filename, dirname);
+ require, module, filename, dirname, process,
+ localGlobal, localBuffer);
+ require, module, filename, dirname,
+ process, localGlobal, localBuffer);
} else {
result = compiledWrapper.call(thisValue, exports, require, module,
- filename, dirname);
+ filename, dirname, process, localGlobal,
+ localBuffer);
}
hasLoadedAnyUserCJSModule = true;
if (requireDepth === 0) statCache = null;
return result;

0 comments on commit d46b459

Please sign in to comment.