Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index 5b7df8a5184a10f3d026e1f5e27b1b51ccaac4f6..b4f00285bed38397ad9d126c2ee5cca284ec511d 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -1626,22 +1626,11 @@ RUNTIME_FUNCTION(Runtime_GetScript) { |
} |
-bool DebugStepInIsActive(Debug* debug) { |
- return debug->is_active() && debug->IsStepping() && |
- debug->last_step_action() == StepIn; |
-} |
- |
- |
// Set one shot breakpoints for the callback function that is passed to a |
// built-in function such as Array.forEach to enable stepping into the callback, |
// if we are indeed stepping and the callback is subject to debugging. |
RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) { |
DCHECK(args.length() == 1); |
- Debug* debug = isolate->debug(); |
- if (debug->in_debug_scope() || !DebugStepInIsActive(debug)) { |
- return isolate->heap()->undefined_value(); |
- } |
- |
HandleScope scope(isolate); |
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
RUNTIME_ASSERT(object->IsJSFunction() || object->IsJSGeneratorObject()); |
@@ -1653,8 +1642,7 @@ RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) { |
Handle<JSGeneratorObject>::cast(object)->function(), isolate); |
} |
- debug->ClearStepOut(); |
- debug->FloodWithOneShotGeneric(fun); |
+ isolate->debug()->PrepareStepIn(fun); |
return isolate->heap()->undefined_value(); |
} |
@@ -1665,6 +1653,8 @@ RUNTIME_FUNCTION(Runtime_DebugPushPromise) { |
CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); |
isolate->PushPromise(promise, function); |
+ // If we are in step-in mode, flood the handler. |
+ isolate->debug()->EnableStepIn(); |
return isolate->heap()->undefined_value(); |
} |
@@ -1701,17 +1691,6 @@ RUNTIME_FUNCTION(Runtime_DebugIsActive) { |
} |
-RUNTIME_FUNCTION(Runtime_DebugHandleStepIntoAccessor) { |
- HandleScope scope(isolate); |
- DCHECK(args.length() == 2); |
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
- Debug* debug = isolate->debug(); |
- // Handle stepping into constructors if step into is active. |
- if (debug->StepInActive()) debug->HandleStepIn(function); |
- return *isolate->factory()->undefined_value(); |
-} |
- |
- |
RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
UNIMPLEMENTED(); |
return NULL; |