Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: src/runtime/runtime-debug.cc

Issue 1474293002: [debugger] Remove code to predict step-in target. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix mips Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/objects.cc ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698