Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index a6f73128882581fcda0dc2ee417996ac40cb9072..a784619d6fb3a4be19baff4da3389ed40fe9caff 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2710,7 +2710,11 @@ void Isolate::RemoveCallCompletedCallback(CallCompletedCallback callback) { |
void Isolate::FireCallCompletedCallback() { |
bool has_call_completed_callbacks = !call_completed_callbacks_.is_empty(); |
- bool run_microtasks = autorun_microtasks() && pending_microtask_count(); |
+ 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; |