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; |
} |
} |