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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/debug/debug-evaluate.h" | 8 #include "src/debug/debug-evaluate.h" |
9 #include "src/debug/debug-frames.h" | 9 #include "src/debug/debug-frames.h" |
10 #include "src/debug/debug-scopes.h" | 10 #include "src/debug/debug-scopes.h" |
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1691 // built-in function such as Array.forEach to enable stepping into the callback, | 1691 // built-in function such as Array.forEach to enable stepping into the callback, |
1692 // if we are indeed stepping and the callback is subject to debugging. | 1692 // if we are indeed stepping and the callback is subject to debugging. |
1693 RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) { | 1693 RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) { |
1694 HandleScope scope(isolate); | 1694 HandleScope scope(isolate); |
1695 DCHECK_EQ(1, args.length()); | 1695 DCHECK_EQ(1, args.length()); |
1696 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); | 1696 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); |
1697 isolate->debug()->PrepareStepIn(fun); | 1697 isolate->debug()->PrepareStepIn(fun); |
1698 return isolate->heap()->undefined_value(); | 1698 return isolate->heap()->undefined_value(); |
1699 } | 1699 } |
1700 | 1700 |
| 1701 // Set one shot breakpoints for the suspended generator object. |
| 1702 RUNTIME_FUNCTION(Runtime_DebugPrepareStepInSuspendedGenerator) { |
| 1703 HandleScope scope(isolate); |
| 1704 DCHECK_EQ(0, args.length()); |
| 1705 isolate->debug()->PrepareStepInSuspendedGenerator(); |
| 1706 return isolate->heap()->undefined_value(); |
| 1707 } |
1701 | 1708 |
1702 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { | 1709 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { |
1703 DCHECK(args.length() == 2); | 1710 DCHECK(args.length() == 2); |
1704 HandleScope scope(isolate); | 1711 HandleScope scope(isolate); |
1705 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 1712 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
1706 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); | 1713 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); |
1707 isolate->PushPromise(promise, function); | 1714 isolate->PushPromise(promise, function); |
1708 // If we are in step-in mode, flood the handler. | 1715 // If we are in step-in mode, flood the handler. |
1709 isolate->debug()->EnableStepIn(); | 1716 isolate->debug()->EnableStepIn(); |
1710 return isolate->heap()->undefined_value(); | 1717 return isolate->heap()->undefined_value(); |
(...skipping 22 matching lines...) Expand all Loading... |
1733 return Smi::FromInt(isolate->debug()->is_active()); | 1740 return Smi::FromInt(isolate->debug()->is_active()); |
1734 } | 1741 } |
1735 | 1742 |
1736 | 1743 |
1737 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1744 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
1738 UNIMPLEMENTED(); | 1745 UNIMPLEMENTED(); |
1739 return NULL; | 1746 return NULL; |
1740 } | 1747 } |
1741 } // namespace internal | 1748 } // namespace internal |
1742 } // namespace v8 | 1749 } // namespace v8 |
OLD | NEW |