| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index a2500c0a6d9e16dfb10ad75a866aea135854b7f3..3a78cfc519fe65f6dc7aa58282c3b66e7e63529a 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -2781,16 +2781,19 @@ void Isolate::RemoveCallCompletedCallback(CallCompletedCallback callback) {
|
|
|
|
|
| void Isolate::FireCallCompletedCallback() {
|
| - bool has_call_completed_callbacks = !call_completed_callbacks_.is_empty();
|
| + if (!handle_scope_implementer()->CallDepthIsZero()) return;
|
| +
|
| bool run_microtasks =
|
| pending_microtask_count() &&
|
| !handle_scope_implementer()->HasMicrotasksSuppressions() &&
|
| handle_scope_implementer()->microtasks_policy() ==
|
| v8::MicrotasksPolicy::kAuto;
|
| - if (!has_call_completed_callbacks && !run_microtasks) return;
|
|
|
| - if (!handle_scope_implementer()->CallDepthIsZero()) return;
|
| if (run_microtasks) RunMicrotasks();
|
| + // Prevent stepping from spilling into the next call made by the embedder.
|
| + if (debug()->is_active()) debug()->ClearStepping();
|
| +
|
| + if (call_completed_callbacks_.is_empty()) return;
|
| // Fire callbacks. Increase call depth to prevent recursive callbacks.
|
| v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(this);
|
| v8::Isolate::SuppressMicrotaskExecutionScope suppress(isolate);
|
|
|