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

Unified Diff: src/debug/debug.cc

Issue 2648353006: [inspector] ignores debugger; in blackboxed code (Closed)
Patch Set: added a comment Created 3 years, 11 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/inspector/debugger/framework-break-expected.txt » ('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 a21bfde25c1c5fab931337dc0679f97ddf16e9a9..b929058c6ba14b80e8312f4ad1a15f445a83612b 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -2137,10 +2137,16 @@ void Debug::HandleDebugBreak() {
DCHECK(!it.done());
Object* fun = it.frame()->function();
if (fun && fun->IsJSFunction()) {
- // Don't stop in builtin functions.
- if (!JSFunction::cast(fun)->shared()->IsSubjectToDebugging()) return;
- if (isolate_->stack_guard()->CheckDebugBreak() &&
+ // Don't stop in builtin and blackboxed functions.
+ if (!JSFunction::cast(fun)->shared()->IsSubjectToDebugging() ||
IsBlackboxed(JSFunction::cast(fun)->shared())) {
+ // Inspector uses pause on next statement for asynchronous breakpoints.
+ // When breakpoint is fired we try to break on first not blackboxed
+ // statement. To achieve this goal we need to deoptimize current
+ // function and don't clear requested DebugBreak even if it's blackboxed
+ // to be able to break on not blackboxed function call.
+ // TODO(yangguo): introduce break_on_function_entry since current
+ // implementation is slow.
Deoptimizer::DeoptimizeFunction(JSFunction::cast(fun));
return;
}
« no previous file with comments | « no previous file | test/inspector/debugger/framework-break-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698