OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 Handle<String> source_code = | 638 Handle<String> source_code = |
639 isolate->bootstrapper()->SourceLookup<Natives>(index); | 639 isolate->bootstrapper()->SourceLookup<Natives>(index); |
640 Vector<const char> name = Natives::GetScriptName(index); | 640 Vector<const char> name = Natives::GetScriptName(index); |
641 Handle<String> script_name = | 641 Handle<String> script_name = |
642 factory->NewStringFromAscii(name).ToHandleChecked(); | 642 factory->NewStringFromAscii(name).ToHandleChecked(); |
643 Handle<Context> context = isolate->native_context(); | 643 Handle<Context> context = isolate->native_context(); |
644 | 644 |
645 // Compile the script. | 645 // Compile the script. |
646 Handle<SharedFunctionInfo> function_info; | 646 Handle<SharedFunctionInfo> function_info; |
647 function_info = Compiler::CompileScript( | 647 function_info = Compiler::CompileScript( |
648 source_code, script_name, 0, 0, false, false, Handle<Object>(), context, | 648 source_code, script_name, 0, 0, ScriptOriginOptions(), Handle<Object>(), |
649 NULL, NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, false); | 649 context, NULL, NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, |
| 650 false); |
650 | 651 |
651 // Silently ignore stack overflows during compilation. | 652 // Silently ignore stack overflows during compilation. |
652 if (function_info.is_null()) { | 653 if (function_info.is_null()) { |
653 DCHECK(isolate->has_pending_exception()); | 654 DCHECK(isolate->has_pending_exception()); |
654 isolate->clear_pending_exception(); | 655 isolate->clear_pending_exception(); |
655 return false; | 656 return false; |
656 } | 657 } |
657 | 658 |
658 // Execute the shared function in the debugger context. | 659 // Execute the shared function in the debugger context. |
659 Handle<JSFunction> function = | 660 Handle<JSFunction> function = |
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3400 logger_->DebugEvent("Put", message.text()); | 3401 logger_->DebugEvent("Put", message.text()); |
3401 } | 3402 } |
3402 | 3403 |
3403 | 3404 |
3404 void LockingCommandMessageQueue::Clear() { | 3405 void LockingCommandMessageQueue::Clear() { |
3405 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3406 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3406 queue_.Clear(); | 3407 queue_.Clear(); |
3407 } | 3408 } |
3408 | 3409 |
3409 } } // namespace v8::internal | 3410 } } // namespace v8::internal |
OLD | NEW |