Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making "root" available in both context and non-context mode.

  • Loading branch information...
commit c5eb1b55d9e329d477b9b9ba9b24d681c287491c 1 parent 0906f94
@herby herby authored ry committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/node.js
View
4 src/node.js
@@ -3,6 +3,7 @@
process.global.process = process;
process.global.global = process.global;
global.GLOBAL = global;
+global.root = global;
/** deprecation errors ************************************************/
@@ -429,7 +430,7 @@ var module = (function () {
sandbox.__filename = filename;
sandbox.__dirname = dirname;
sandbox.module = self;
- sandbox.root = global;
+ sandbox.root = root;
Script.runInNewContext(content, sandbox, filename);
@@ -441,7 +442,6 @@ var module = (function () {
global.__filename = filename;
global.__dirname = dirname;
global.module = self;
- global.root = global;
Script.runInThisContext(content, filename);
}
Please sign in to comment.
Something went wrong with that request. Please try again.