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

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

Issue 1030673002: Make debugger step into bound callbacks passed to Array.forEach. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed test Created 5 years, 9 months 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 | « no previous file | test/mjsunit/debug-stepin-foreach.js » ('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 553f45fa0dcafc77fd62454009b25cda828e620f..392f943472245bccce9f72b161eaddcdff79258e 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -2738,7 +2738,7 @@ RUNTIME_FUNCTION(Runtime_GetScript) {
}
-// Check whether debugger and is about to step into the callback that is passed
+// Check whether debugger is about to step into the callback that is passed
// to a built-in function such as Array.forEach.
RUNTIME_FUNCTION(Runtime_DebugCallbackSupportsStepping) {
DCHECK(args.length() == 1);
@@ -2748,9 +2748,12 @@ RUNTIME_FUNCTION(Runtime_DebugCallbackSupportsStepping) {
return isolate->heap()->false_value();
}
CONVERT_ARG_CHECKED(Object, callback, 0);
- // We do not step into the callback if it's a builtin or not even a function.
- return isolate->heap()->ToBoolean(callback->IsJSFunction() &&
- !JSFunction::cast(callback)->IsBuiltin());
+ // We do not step into the callback if it's a builtin other than a bound,
+ // or not even a function.
+ return isolate->heap()->ToBoolean(
+ callback->IsJSFunction() &&
+ (!JSFunction::cast(callback)->IsBuiltin() ||
+ JSFunction::cast(callback)->shared()->bound()));
}
@@ -2775,7 +2778,7 @@ RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) {
// if we do not leave the builtin. To be able to step into the function
// again, we need to clear the step out at this point.
debug->ClearStepOut();
- debug->FloodWithOneShot(fun);
+ debug->FloodWithOneShotGeneric(fun);
return isolate->heap()->undefined_value();
}
« no previous file with comments | « no previous file | test/mjsunit/debug-stepin-foreach.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698