Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-12-19 15:25:27 +0300
committerAnna Henningsen <anna@addaleax.net>2020-12-21 15:28:51 +0300
commit2070d5b52431c5fb4b35a07a998f0f9b9805e90a (patch)
treeb09867a4796f89f4203de88a40a63c616a81854c /src/api
parent82dd23f5eccac652898315c67b4ee648b18e9783 (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.cc3
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();
}