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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 | 629 |
630 bool Debug::CompileDebuggerScript(Isolate* isolate, int index) { | 630 bool Debug::CompileDebuggerScript(Isolate* isolate, int index) { |
631 Factory* factory = isolate->factory(); | 631 Factory* factory = isolate->factory(); |
632 HandleScope scope(isolate); | 632 HandleScope scope(isolate); |
633 | 633 |
634 // Bail out if the index is invalid. | 634 // Bail out if the index is invalid. |
635 if (index == -1) return false; | 635 if (index == -1) return false; |
636 | 636 |
637 // Find source and name for the requested script. | 637 // Find source and name for the requested script. |
638 Handle<String> source_code = | 638 Handle<String> source_code = |
639 isolate->bootstrapper()->NativesSourceLookup(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, false, false, Handle<Object>(), context, |
649 NULL, NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, false); | 649 NULL, NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, false); |
(...skipping 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3399 logger_->DebugEvent("Put", message.text()); | 3399 logger_->DebugEvent("Put", message.text()); |
3400 } | 3400 } |
3401 | 3401 |
3402 | 3402 |
3403 void LockingCommandMessageQueue::Clear() { | 3403 void LockingCommandMessageQueue::Clear() { |
3404 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3404 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3405 queue_.Clear(); | 3405 queue_.Clear(); |
3406 } | 3406 } |
3407 | 3407 |
3408 } } // namespace v8::internal | 3408 } } // namespace v8::internal |
OLD | NEW |