Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: src/d8.cc

Issue 10693: Merged bleeding_edge -r 685:746 into regexp2000. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.h ('k') | src/d8-readline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
===================================================================
--- src/d8.cc (revision 746)
+++ src/d8.cc (working copy)
@@ -235,6 +235,19 @@
utility_context_->SetSecurityToken(Undefined());
Context::Scope utility_scope(utility_context_);
+ i::JSArguments js_args = i::FLAG_js_arguments;
+ i::Handle<i::FixedArray> arguments_array =
+ i::Factory::NewFixedArray(js_args.argc());
+ for (int j = 0; j < js_args.argc(); j++) {
+ i::Handle<i::String> arg =
+ i::Factory::NewStringFromUtf8(i::CStrVector(js_args[j]));
+ arguments_array->set(j, *arg);
+ }
+ i::Handle<i::JSArray> arguments_jsarray =
+ i::Factory::NewJSArrayWithElements(arguments_array);
+ global_template->Set(String::New("arguments"),
+ Utils::ToLocal(arguments_jsarray));
+
// Install the debugger object in the utility scope
i::Debug::Load();
i::Debug::debug_context()->set_security_token(i::Heap::undefined_value());
@@ -318,6 +331,9 @@
int Shell::Main(int argc, char* argv[]) {
i::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
+ if (i::FLAG_help) {
+ return 1;
+ }
Initialize();
bool run_shell = (argc == 1);
Context::Scope context_scope(evaluation_context_);
Property changes on: src/d8.cc
___________________________________________________________________
Name: svn:eol-style
+ native
« no previous file with comments | « src/d8.h ('k') | src/d8-readline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698