OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 v8::Local<v8::Context>::New(isolate, debug_message_context); | 130 v8::Local<v8::Context>::New(isolate, debug_message_context); |
131 v8::Context::Scope scope(context); | 131 v8::Context::Scope scope(context); |
132 | 132 |
133 v8::Debug::ProcessDebugMessages(); | 133 v8::Debug::ProcessDebugMessages(); |
134 } | 134 } |
135 #endif // ENABLE_DEBUGGER_SUPPORT | 135 #endif // ENABLE_DEBUGGER_SUPPORT |
136 | 136 |
137 | 137 |
138 int RunMain(int argc, char* argv[]) { | 138 int RunMain(int argc, char* argv[]) { |
139 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); | 139 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); |
| 140 v8::V8::SetFlagsFromString("--noenable_i18n", |
| 141 static_cast<int>(strlen("--noenable_i18n"))); |
140 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 142 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
141 v8::HandleScope handle_scope(isolate); | 143 v8::HandleScope handle_scope(isolate); |
142 | 144 |
143 v8::Handle<v8::String> script_source; | 145 v8::Handle<v8::String> script_source; |
144 v8::Handle<v8::Value> script_name; | 146 v8::Handle<v8::Value> script_name; |
145 int script_param_counter = 0; | 147 int script_param_counter = 0; |
146 | 148 |
147 #ifdef ENABLE_DEBUGGER_SUPPORT | 149 #ifdef ENABLE_DEBUGGER_SUPPORT |
148 int port_number = -1; | 150 int port_number = -1; |
149 bool wait_for_connection = false; | 151 bool wait_for_connection = false; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 442 } |
441 // Remove newline char | 443 // Remove newline char |
442 for (char* pos = buffer; *pos != '\0'; pos++) { | 444 for (char* pos = buffer; *pos != '\0'; pos++) { |
443 if (*pos == '\n') { | 445 if (*pos == '\n') { |
444 *pos = '\0'; | 446 *pos = '\0'; |
445 break; | 447 break; |
446 } | 448 } |
447 } | 449 } |
448 return v8::String::New(buffer); | 450 return v8::String::New(buffer); |
449 } | 451 } |
OLD | NEW |