Browse Source

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

v0.7.4-release
Herbert Vojčík 15 years ago
committed by Ryan Dahl
parent
commit
c5eb1b55d9
  1. 4
      src/node.js

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);
}

Loading…
Cancel
Save