diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-12-19 15:25:27 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-12-21 15:28:51 +0300 |
commit | 2070d5b52431c5fb4b35a07a998f0f9b9805e90a (patch) | |
tree | b09867a4796f89f4203de88a40a63c616a81854c /src/api | |
parent | 82dd23f5eccac652898315c67b4ee648b18e9783 (diff) |
src: use correct microtask queue for checkpoints
I missed in c6c8337402 that we should not just use that queue for
enqueuing microtasks, but also for running them.
Refs: https://github.com/nodejs/node/pull/36482
PR-URL: https://github.com/nodejs/node/pull/36581
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/callback.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/api/callback.cc b/src/api/callback.cc index 8a0b71cd362..a7b23dd4924 100644 --- a/src/api/callback.cc +++ b/src/api/callback.cc @@ -12,7 +12,6 @@ using v8::HandleScope; using v8::Isolate; using v8::Local; using v8::MaybeLocal; -using v8::MicrotasksScope; using v8::Object; using v8::String; using v8::Value; @@ -111,7 +110,7 @@ void InternalCallbackScope::Close() { auto weakref_cleanup = OnScopeLeave([&]() { env_->RunWeakRefCleanup(); }); if (!tick_info->has_tick_scheduled()) { - MicrotasksScope::PerformCheckpoint(env_->isolate()); + env_->context()->GetMicrotaskQueue()->PerformCheckpoint(env_->isolate()); perform_stopping_check(); } |