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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 | 686 |
687 // Clear all current stepping setup. | 687 // Clear all current stepping setup. |
688 ClearStepping(); | 688 ClearStepping(); |
689 | 689 |
690 // Set up for the remaining steps. | 690 // Set up for the remaining steps. |
691 PrepareStep(step_action, step_count, StackFrame::NO_ID); | 691 PrepareStep(step_action, step_count, StackFrame::NO_ID); |
692 } | 692 } |
693 } | 693 } |
694 | 694 |
695 | 695 |
696 RUNTIME_FUNCTION(Debug_Break) { | |
697 // Get the top-most JavaScript frame. | |
698 JavaScriptFrameIterator it(isolate); | |
699 isolate->debug()->Break(args, it.frame()); | |
700 isolate->debug()->SetAfterBreakTarget(it.frame()); | |
701 return isolate->heap()->undefined_value(); | |
702 } | |
703 | |
704 | |
705 // Check the break point objects for whether one or more are actually | 696 // Check the break point objects for whether one or more are actually |
706 // triggered. This function returns a JSArray with the break point objects | 697 // triggered. This function returns a JSArray with the break point objects |
707 // which is triggered. | 698 // which is triggered. |
708 Handle<Object> Debug::CheckBreakPoints(Handle<Object> break_point_objects) { | 699 Handle<Object> Debug::CheckBreakPoints(Handle<Object> break_point_objects) { |
709 Factory* factory = isolate_->factory(); | 700 Factory* factory = isolate_->factory(); |
710 | 701 |
711 // Count the number of break points hit. If there are multiple break points | 702 // Count the number of break points hit. If there are multiple break points |
712 // they are in a FixedArray. | 703 // they are in a FixedArray. |
713 Handle<FixedArray> break_points_hit; | 704 Handle<FixedArray> break_points_hit; |
714 int break_points_hit_count = 0; | 705 int break_points_hit_count = 0; |
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2834 } | 2825 } |
2835 | 2826 |
2836 | 2827 |
2837 void LockingCommandMessageQueue::Clear() { | 2828 void LockingCommandMessageQueue::Clear() { |
2838 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2829 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2839 queue_.Clear(); | 2830 queue_.Clear(); |
2840 } | 2831 } |
2841 | 2832 |
2842 } // namespace internal | 2833 } // namespace internal |
2843 } // namespace v8 | 2834 } // namespace v8 |
OLD | NEW |