OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "execution.h" | 5 #include "execution.h" |
6 | 6 |
7 #include "bootstrapper.h" | 7 #include "bootstrapper.h" |
8 #include "codegen.h" | 8 #include "codegen.h" |
9 #include "deoptimizer.h" | 9 #include "deoptimizer.h" |
10 #include "isolate-inl.h" | 10 #include "isolate-inl.h" |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 !isolate->stack_guard()->CheckDebugBreak(); | 685 !isolate->stack_guard()->CheckDebugBreak(); |
686 | 686 |
687 isolate->stack_guard()->ClearDebugBreak(); | 687 isolate->stack_guard()->ClearDebugBreak(); |
688 | 688 |
689 Execution::ProcessDebugMessages(isolate, debug_command_only); | 689 Execution::ProcessDebugMessages(isolate, debug_command_only); |
690 } | 690 } |
691 | 691 |
692 | 692 |
693 void Execution::ProcessDebugMessages(Isolate* isolate, | 693 void Execution::ProcessDebugMessages(Isolate* isolate, |
694 bool debug_command_only) { | 694 bool debug_command_only) { |
695 // Assert that we are on the main thread of the isolate. | |
696 ASSERT(ThreadId::Current().Equals(isolate->thread_id())); | |
697 | |
698 isolate->stack_guard()->ClearDebugCommand(); | 695 isolate->stack_guard()->ClearDebugCommand(); |
699 | 696 |
700 StackLimitCheck check(isolate); | 697 StackLimitCheck check(isolate); |
701 if (check.HasOverflowed()) return; | 698 if (check.HasOverflowed()) return; |
702 | 699 |
703 HandleScope scope(isolate); | 700 HandleScope scope(isolate); |
704 // Enter the debugger. Just continue if we fail to enter the debugger. | 701 // Enter the debugger. Just continue if we fail to enter the debugger. |
705 EnterDebugger debugger(isolate); | 702 EnterDebugger debugger(isolate); |
706 if (debugger.FailedToEnter()) return; | 703 if (debugger.FailedToEnter()) return; |
707 | 704 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 751 |
755 if (has_api_interrupt) { | 752 if (has_api_interrupt) { |
756 // Callback must be invoked outside of ExecusionAccess lock. | 753 // Callback must be invoked outside of ExecusionAccess lock. |
757 isolate_->InvokeApiInterruptCallback(); | 754 isolate_->InvokeApiInterruptCallback(); |
758 } | 755 } |
759 | 756 |
760 return isolate_->heap()->undefined_value(); | 757 return isolate_->heap()->undefined_value(); |
761 } | 758 } |
762 | 759 |
763 } } // namespace v8::internal | 760 } } // namespace v8::internal |
OLD | NEW |