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

Side by Side Diff: src/debug/debug.cc

Issue 1286143002: Debugger: correctly ensure debug info in Debug::Break. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | no next file » | 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/debug/debug.h" 7 #include "src/debug/debug.h"
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 if (break_disabled()) return; 573 if (break_disabled()) return;
574 574
575 // Enter the debugger. 575 // Enter the debugger.
576 DebugScope debug_scope(this); 576 DebugScope debug_scope(this);
577 if (debug_scope.failed()) return; 577 if (debug_scope.failed()) return;
578 578
579 // Postpone interrupt during breakpoint processing. 579 // Postpone interrupt during breakpoint processing.
580 PostponeInterruptsScope postpone(isolate_); 580 PostponeInterruptsScope postpone(isolate_);
581 581
582 // Get the debug info (create it if it does not exist). 582 // Get the debug info (create it if it does not exist).
583 Handle<SharedFunctionInfo> shared = 583 Handle<JSFunction> function(frame->function());
584 Handle<SharedFunctionInfo>(frame->function()->shared()); 584 Handle<SharedFunctionInfo> shared(function->shared());
585 if (!EnsureDebugInfo(shared, function)) {
586 // Return if we failed to retrieve the debug info.
587 return;
588 }
585 Handle<DebugInfo> debug_info(shared->GetDebugInfo()); 589 Handle<DebugInfo> debug_info(shared->GetDebugInfo());
586 590
587 // Find the break point where execution has stopped. 591 // Find the break point where execution has stopped.
588 // PC points to the instruction after the current one, possibly a break 592 // PC points to the instruction after the current one, possibly a break
589 // location as well. So the "- 1" to exclude it from the search. 593 // location as well. So the "- 1" to exclude it from the search.
590 Address call_pc = frame->pc() - 1; 594 Address call_pc = frame->pc() - 1;
591 BreakLocation break_location = 595 BreakLocation break_location =
592 BreakLocation::FromAddress(debug_info, ALL_BREAK_LOCATIONS, call_pc); 596 BreakLocation::FromAddress(debug_info, ALL_BREAK_LOCATIONS, call_pc);
593 597
594 // Check whether step next reached a new statement. 598 // Check whether step next reached a new statement.
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 } 2809 }
2806 2810
2807 2811
2808 void LockingCommandMessageQueue::Clear() { 2812 void LockingCommandMessageQueue::Clear() {
2809 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2813 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2810 queue_.Clear(); 2814 queue_.Clear();
2811 } 2815 }
2812 2816
2813 } // namespace internal 2817 } // namespace internal
2814 } // namespace v8 2818 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698