diff options
author | isaacs <i@izs.me> | 2013-08-21 17:19:41 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-08-21 17:58:12 -0700 |
commit | eef552774e1c78b113e1b543cb9463cd64ecd5ed (patch) | |
tree | 2febee76c7c4b9c4e1a908a85ee1226321440141 /lib/vm.js | |
parent | 7afdba6e0bc3b69c2bf5fdbd59f938ac8f7a64c5 (diff) | |
download | android-node-v8-eef552774e1c78b113e1b543cb9463cd64ecd5ed.tar.gz android-node-v8-eef552774e1c78b113e1b543cb9463cd64ecd5ed.tar.bz2 android-node-v8-eef552774e1c78b113e1b543cb9463cd64ecd5ed.zip |
vm: Put back display_errors flag
This is an important part of the repl use-case.
TODO: The arg parsing in vm.runIn*Context() is rather wonky.
It would be good to move more of that into the Script class,
and/or an options object.
Diffstat (limited to 'lib/vm.js')
-rw-r--r-- | lib/vm.js | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -30,15 +30,15 @@ var util = require('util'); // - makeContext(sandbox) // From this we build the entire documented API. -Script.prototype.runInNewContext = function(initSandbox, timeout) { +Script.prototype.runInNewContext = function(initSandbox, timeout, disp) { var context = exports.createContext(initSandbox); - return this.runInContext(context, timeout); + return this.runInContext(context, timeout, disp); }; exports.Script = Script; -exports.createScript = function(code, filename) { - return new Script(code, filename); +exports.createScript = function(code, filename, disp) { + return new Script(code, filename, disp); }; exports.createContext = function(initSandbox) { @@ -51,17 +51,17 @@ exports.createContext = function(initSandbox) { return initSandbox; }; -exports.runInContext = function(code, sandbox, filename, timeout) { - var script = exports.createScript(code, filename); - return script.runInContext(sandbox, timeout); +exports.runInContext = function(code, sandbox, filename, timeout, disp) { + var script = exports.createScript(code, filename, disp); + return script.runInContext(sandbox, timeout, disp); }; -exports.runInNewContext = function(code, sandbox, filename, timeout) { - var script = exports.createScript(code, filename); - return script.runInNewContext(sandbox, timeout); +exports.runInNewContext = function(code, sandbox, filename, timeout, disp) { + var script = exports.createScript(code, filename, disp); + return script.runInNewContext(sandbox, timeout, disp); }; -exports.runInThisContext = function(code, filename, timeout) { - var script = exports.createScript(code, filename); - return script.runInThisContext(timeout); +exports.runInThisContext = function(code, filename, timeout, disp) { + var script = exports.createScript(code, filename, disp); + return script.runInThisContext(timeout, disp); }; |