| 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 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 GlobalObject* global = JSFunction::cast(fun)->context()->global_object(); | 2728 GlobalObject* global = JSFunction::cast(fun)->context()->global_object(); |
| 2729 // Don't stop in debugger functions. | 2729 // Don't stop in debugger functions. |
| 2730 if (IsDebugGlobal(global)) return; | 2730 if (IsDebugGlobal(global)) return; |
| 2731 } | 2731 } |
| 2732 } | 2732 } |
| 2733 | 2733 |
| 2734 // Collect the break state before clearing the flags. | 2734 // Collect the break state before clearing the flags. |
| 2735 bool debug_command_only = isolate_->stack_guard()->CheckDebugCommand() && | 2735 bool debug_command_only = isolate_->stack_guard()->CheckDebugCommand() && |
| 2736 !isolate_->stack_guard()->CheckDebugBreak(); | 2736 !isolate_->stack_guard()->CheckDebugBreak(); |
| 2737 | 2737 |
| 2738 bool is_debugger_statement = !isolate_->stack_guard()->CheckDebugCommand() && |
| 2739 !isolate_->stack_guard()->CheckDebugBreak(); |
| 2740 |
| 2738 isolate_->stack_guard()->ClearDebugBreak(); | 2741 isolate_->stack_guard()->ClearDebugBreak(); |
| 2739 | 2742 |
| 2743 if (is_debugger_statement) { |
| 2744 // If we have been called via 'debugger' Javascript statement, |
| 2745 // we might not be prepared for breakpoints. |
| 2746 // TODO(dslomov,yangguo): CheckDebugBreak may race with RequestDebugBreak. |
| 2747 // Revisit this to clean-up. |
| 2748 HandleScope handle_scope(isolate_); |
| 2749 PrepareForBreakPoints(); |
| 2750 } |
| 2740 ProcessDebugMessages(debug_command_only); | 2751 ProcessDebugMessages(debug_command_only); |
| 2741 } | 2752 } |
| 2742 | 2753 |
| 2743 | 2754 |
| 2744 void Debug::ProcessDebugMessages(bool debug_command_only) { | 2755 void Debug::ProcessDebugMessages(bool debug_command_only) { |
| 2745 isolate_->stack_guard()->ClearDebugCommand(); | 2756 isolate_->stack_guard()->ClearDebugCommand(); |
| 2746 | 2757 |
| 2747 StackLimitCheck check(isolate_); | 2758 StackLimitCheck check(isolate_); |
| 2748 if (check.HasOverflowed()) return; | 2759 if (check.HasOverflowed()) return; |
| 2749 | 2760 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3060 } | 3071 } |
| 3061 | 3072 |
| 3062 | 3073 |
| 3063 void LockingCommandMessageQueue::Clear() { | 3074 void LockingCommandMessageQueue::Clear() { |
| 3064 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3075 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 3065 queue_.Clear(); | 3076 queue_.Clear(); |
| 3066 } | 3077 } |
| 3067 | 3078 |
| 3068 } // namespace internal | 3079 } // namespace internal |
| 3069 } // namespace v8 | 3080 } // namespace v8 |
| OLD | NEW |