OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 | 2725 |
2726 if (found.is_null()) return heap->undefined_value(); | 2726 if (found.is_null()) return heap->undefined_value(); |
2727 return *Script::GetWrapper(found); | 2727 return *Script::GetWrapper(found); |
2728 } | 2728 } |
2729 | 2729 |
2730 | 2730 |
2731 // Check whether debugger and is about to step into the callback that is passed | 2731 // Check whether debugger and is about to step into the callback that is passed |
2732 // to a built-in function such as Array.forEach. | 2732 // to a built-in function such as Array.forEach. |
2733 RUNTIME_FUNCTION(Runtime_DebugCallbackSupportsStepping) { | 2733 RUNTIME_FUNCTION(Runtime_DebugCallbackSupportsStepping) { |
2734 DCHECK(args.length() == 1); | 2734 DCHECK(args.length() == 1); |
2735 if (!isolate->debug()->is_active() || !isolate->debug()->StepInActive()) { | 2735 Debug* debug = isolate->debug(); |
| 2736 if (!debug->is_active() || !debug->IsStepping() || |
| 2737 debug->last_step_action() != StepIn) { |
2736 return isolate->heap()->false_value(); | 2738 return isolate->heap()->false_value(); |
2737 } | 2739 } |
2738 CONVERT_ARG_CHECKED(Object, callback, 0); | 2740 CONVERT_ARG_CHECKED(Object, callback, 0); |
2739 // We do not step into the callback if it's a builtin or not even a function. | 2741 // We do not step into the callback if it's a builtin or not even a function. |
2740 return isolate->heap()->ToBoolean(callback->IsJSFunction() && | 2742 return isolate->heap()->ToBoolean(callback->IsJSFunction() && |
2741 !JSFunction::cast(callback)->IsBuiltin()); | 2743 !JSFunction::cast(callback)->IsBuiltin()); |
2742 } | 2744 } |
2743 | 2745 |
2744 | 2746 |
2745 // Set one shot breakpoints for the callback function that is passed to a | 2747 // Set one shot breakpoints for the callback function that is passed to a |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2808 return Smi::FromInt(isolate->debug()->is_active()); | 2810 return Smi::FromInt(isolate->debug()->is_active()); |
2809 } | 2811 } |
2810 | 2812 |
2811 | 2813 |
2812 RUNTIME_FUNCTION(RuntimeReference_DebugBreakInOptimizedCode) { | 2814 RUNTIME_FUNCTION(RuntimeReference_DebugBreakInOptimizedCode) { |
2813 UNIMPLEMENTED(); | 2815 UNIMPLEMENTED(); |
2814 return NULL; | 2816 return NULL; |
2815 } | 2817 } |
2816 } | 2818 } |
2817 } // namespace v8::internal | 2819 } // namespace v8::internal |
OLD | NEW |