| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "api.h" | 7 #include "api.h" |
| 8 #include "arguments.h" | 8 #include "arguments.h" |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 | 806 |
| 807 void Debug::Unload() { | 807 void Debug::Unload() { |
| 808 ClearAllBreakPoints(); | 808 ClearAllBreakPoints(); |
| 809 | 809 |
| 810 // Return debugger is not loaded. | 810 // Return debugger is not loaded. |
| 811 if (!IsLoaded()) return; | 811 if (!IsLoaded()) return; |
| 812 | 812 |
| 813 // Clear the script cache. | 813 // Clear the script cache. |
| 814 DestroyScriptCache(); | 814 DestroyScriptCache(); |
| 815 | 815 |
| 816 // Match unmatched PromiseHandlePrologue calls. |
| 817 while (thread_local_.promise_on_stack_) PromiseHandleEpilogue(); |
| 818 |
| 816 // Clear debugger context global handle. | 819 // Clear debugger context global handle. |
| 817 GlobalHandles::Destroy(Handle<Object>::cast(debug_context_).location()); | 820 GlobalHandles::Destroy(Handle<Object>::cast(debug_context_).location()); |
| 818 debug_context_ = Handle<Context>(); | 821 debug_context_ = Handle<Context>(); |
| 819 } | 822 } |
| 820 | 823 |
| 821 | 824 |
| 822 Object* Debug::Break(Arguments args) { | 825 Object* Debug::Break(Arguments args) { |
| 823 Heap* heap = isolate_->heap(); | 826 Heap* heap = isolate_->heap(); |
| 824 HandleScope scope(isolate_); | 827 HandleScope scope(isolate_); |
| 825 ASSERT(args.length() == 0); | 828 ASSERT(args.length() == 0); |
| (...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3540 logger_->DebugEvent("Put", message.text()); | 3543 logger_->DebugEvent("Put", message.text()); |
| 3541 } | 3544 } |
| 3542 | 3545 |
| 3543 | 3546 |
| 3544 void LockingCommandMessageQueue::Clear() { | 3547 void LockingCommandMessageQueue::Clear() { |
| 3545 LockGuard<Mutex> lock_guard(&mutex_); | 3548 LockGuard<Mutex> lock_guard(&mutex_); |
| 3546 queue_.Clear(); | 3549 queue_.Clear(); |
| 3547 } | 3550 } |
| 3548 | 3551 |
| 3549 } } // namespace v8::internal | 3552 } } // namespace v8::internal |
| OLD | NEW |