| Index: samples/shell.cc
|
| ===================================================================
|
| --- samples/shell.cc (revision 1828)
|
| +++ samples/shell.cc (working copy)
|
| @@ -61,6 +61,13 @@
|
| global->Set(v8::String::New("quit"), v8::FunctionTemplate::New(Quit));
|
| // Bind the 'version' function
|
| global->Set(v8::String::New("version"), v8::FunctionTemplate::New(Version));
|
| + // Create a utility context to allow us to create an array
|
| + v8::Handle<v8::Context> utility_context_ = v8::Context::New(NULL, global);
|
| + utility_context_->SetSecurityToken(v8::Undefined());
|
| + v8::Context::Scope utility_scope(utility_context_);
|
| + // Bind the global 'arguments' variable to the "--" arguments from the command
|
| + // line.
|
| + global->Set(v8::String::New("arguments"), v8::V8::GetJSArguments());
|
| // Create a new execution environment containing the built-in
|
| // functions
|
| v8::Handle<v8::Context> context = v8::Context::New(NULL, global);
|
|
|