Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: src/debug.cc

Issue 1239033002: Debugger: use FrameInspector in ScopeIterator to find context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
2741 isolate_->stack_guard()->ClearDebugBreak(); 2738 isolate_->stack_guard()->ClearDebugBreak();
2742 2739
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 }
2751 ProcessDebugMessages(debug_command_only); 2740 ProcessDebugMessages(debug_command_only);
2752 } 2741 }
2753 2742
2754 2743
2755 void Debug::ProcessDebugMessages(bool debug_command_only) { 2744 void Debug::ProcessDebugMessages(bool debug_command_only) {
2756 isolate_->stack_guard()->ClearDebugCommand(); 2745 isolate_->stack_guard()->ClearDebugCommand();
2757 2746
2758 StackLimitCheck check(isolate_); 2747 StackLimitCheck check(isolate_);
2759 if (check.HasOverflowed()) return; 2748 if (check.HasOverflowed()) return;
2760 2749
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 } 3060 }
3072 3061
3073 3062
3074 void LockingCommandMessageQueue::Clear() { 3063 void LockingCommandMessageQueue::Clear() {
3075 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3064 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3076 queue_.Clear(); 3065 queue_.Clear();
3077 } 3066 }
3078 3067
3079 } // namespace internal 3068 } // namespace internal
3080 } // namespace v8 3069 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698