summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-11-21 19:24:09 +0100
committerAnna Henningsen <anna@addaleax.net>2017-11-28 02:53:42 +0100
commite8a26e783e2e33514d44d8b2725d5f048e1314ce (patch)
treef1441c45d051e864ae6d2b2e656f64a026f9bcbb /lib
parent0319a5e1805bf7728d6116990cb9b7f00f726653 (diff)
downloadnode-new-e8a26e783e2e33514d44d8b2725d5f048e1314ce.tar.gz
lib: add `process` to internal module wrapper
Share `process` through the module wrapper rather than relying on nobody messing with `global.process`. PR-URL: https://github.com/nodejs/node/pull/17198 Fixes: https://github.com/nodejs/node/issues/6802 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/bootstrap_node.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js
index a565916193..d8ebd9af96 100644
--- a/lib/internal/bootstrap_node.js
+++ b/lib/internal/bootstrap_node.js
@@ -608,7 +608,7 @@
};
NativeModule.wrapper = [
- '(function (exports, require, module, internalBinding) {',
+ '(function (exports, require, module, internalBinding, process) {',
'\n});'
];
@@ -627,7 +627,7 @@
const requireFn = this.id.startsWith('internal/deps/') ?
NativeModule.requireForDeps :
NativeModule.require;
- fn(this.exports, requireFn, this, internalBinding);
+ fn(this.exports, requireFn, this, internalBinding, process);
this.loaded = true;
} finally {