diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-08-22 15:09:24 +0200 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-09-16 12:28:47 -0700 |
commit | 21e60643b0795fe7b6a46ff29d73df60e6a7c9f5 (patch) | |
tree | 9eabb3502881497dcb7766179a5d2ee4647a03bd /lib/vm.js | |
parent | 174f7d2820dcb12f1b4b511840416a03cd65b9cf (diff) | |
download | android-node-v8-21e60643b0795fe7b6a46ff29d73df60e6a7c9f5.tar.gz android-node-v8-21e60643b0795fe7b6a46ff29d73df60e6a7c9f5.tar.bz2 android-node-v8-21e60643b0795fe7b6a46ff29d73df60e6a7c9f5.zip |
lib, src: add vm.runInDebugContext()
Compiles and executes source code in V8's debugger context. Provides
a programmatic way to get access to the debug object by executing:
var Debug = vm.runInDebugContext('Debug');
Fixes #7886.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'lib/vm.js')
-rw-r--r-- | lib/vm.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -55,6 +55,10 @@ exports.createContext = function(sandbox) { return sandbox; }; +exports.runInDebugContext = function(code) { + return binding.runInDebugContext(code); +}; + exports.runInContext = function(code, contextifiedSandbox, options) { var script = new Script(code, options); return script.runInContext(contextifiedSandbox, options); |