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

Unified Diff: src/debug/debug.cc

Issue 2668763003: [inspector] V8DebuggerAgent cleanup (Closed)
Patch Set: reverted semantic change - only cleanup 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 | src/inspector/v8-debugger.h » ('j') | src/inspector/v8-debugger.cc » ('J')
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 b732303fc8572bec2abf1c89edc8c7924b77743c..fe915f6c4321719334a6646765e7b1403520dd42 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1000,6 +1000,17 @@ void Debug::PrepareStep(StepAction step_action) {
BreakLocation location = BreakLocation::FromFrame(debug_info, js_frame);
+ // It is used at least in two cases:
+ // - step-next at return position from first callback in microtask will break
+ // in next callback,
+ // - step-next at return position when caller frame is blackboxed will break
+ // in next not blackboxed function called by caller frame if any.
+ // TODO(kozyatinskiy): remove it.
+ if (step_action == StepNext && location.IsReturn()) {
+ thread_local_.last_step_action_ = StepIn;
+ UpdateHookOnFunctionCall();
+ }
+
// Any step at a return is a step-out.
if (location.IsReturn()) step_action = StepOut;
// A step-next at a tail call is a step-out.
@@ -1766,9 +1777,10 @@ void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
{
JavaScriptFrameIterator it(isolate_);
- // Check whether the top frame is blackboxed or the break location is muted.
- if (!it.done() && (IsMutedAtCurrentLocation(it.frame()) ||
- IsExceptionBlackboxed(uncaught))) {
+ // Check whether the top frame is blackboxed or the break location is muted
+ // or current JS stack trace is empty.
+ if (it.done() || IsMutedAtCurrentLocation(it.frame()) ||
+ IsExceptionBlackboxed(uncaught)) {
return;
}
}
« no previous file with comments | « no previous file | src/inspector/v8-debugger.h » ('j') | src/inspector/v8-debugger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698