| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |