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

Unified Diff: src/debug/debug.cc

Issue 1463803002: [debugger] flood function for stepping before calling it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 1 month 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/debug/debug.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index 3830d8eed863c3092529de7f64016e80296a98ca..22676eb37cfdb086c762b141e3cbd2311716eeb3 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -731,6 +731,13 @@ void Debug::ClearAllBreakPoints() {
void Debug::FloodWithOneShot(Handle<JSFunction> function,
BreakLocatorType type) {
+ if (!function->shared()->IsSubjectToDebugging()) {
+ // Builtin functions are not subject to stepping, but need to be
+ // deoptimized, because optimized code does not check for debug
+ // step in at call sites.
+ Deoptimizer::DeoptimizeFunction(*function);
+ return;
+ }
// Make sure the function is compiled and has set up the debug info.
Handle<SharedFunctionInfo> shared(function->shared());
if (!EnsureDebugInfo(shared, function)) {
@@ -2279,6 +2286,9 @@ void Debug::HandleDebugBreak() {
isolate_->stack_guard()->ClearDebugBreak();
+ // Clear stepping to avoid duplicate breaks.
+ ClearStepping();
+
ProcessDebugMessages(debug_command_only);
}
« no previous file with comments | « src/debug/debug.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698