diff options
author | Antranig Basman <antranig.basman@colorado.edu> | 2011-06-02 13:45:30 -0600 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-08-16 14:50:04 +0200 |
commit | c05936ca13681059c7aeecfe3a608e4e1afa800a (patch) | |
tree | 1b0b0e2d28a9eb783ebae7744ef9f0a94618d39b /src/node_script.cc | |
parent | 72246d97a243549c337ad91ab9c113ea7716a83e (diff) | |
download | node-new-c05936ca13681059c7aeecfe3a608e4e1afa800a.tar.gz |
vm: fix incorrect dispatch of vm.runInContext for argument "filename"
Adds test case and documentation for vm.runInContext and vm.createContext.
Fixes #1140.
Diffstat (limited to 'src/node_script.cc')
-rw-r--r-- | src/node_script.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_script.cc b/src/node_script.cc index 6c1099c072..4f4153caa9 100644 --- a/src/node_script.cc +++ b/src/node_script.cc @@ -308,7 +308,7 @@ Handle<Value> WrappedScript::EvalMachine(const Arguments& args) { } const int filename_index = sandbox_index + - (context_flag == newContext ? 1 : 0); + (context_flag == thisContext? 0 : 1); Local<String> filename = args.Length() > filename_index ? args[filename_index]->ToString() : String::New("evalmachine.<anonymous>"); |