mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
src: use correct outer Context’s microtask queue
Fall back to using the outer context’s microtask queue, rather than the Isolate’s default one. This would otherwise result in surprising behavior if an embedder specified a custom microtask queue for the main Node.js context. PR-URL: https://github.com/nodejs/node/pull/36482 Refs: https://github.com/v8/v8/commit/4bf051d536a172e7932845d82f918ad7280c7873 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
4 files changed
+62
-3
No files matched your search
@@ -96,7 +96,8 @@ static void EnqueueMicrotask(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
CHECK(args[0]->IsFunction());
|
||||
|
||||
isolate->EnqueueMicrotask(args[0].As<Function>());
|
||||
isolate->GetCurrentContext()->GetMicrotaskQueue()
|
||||
->EnqueueMicrotask(isolate, args[0].As<Function>());
|
||||
}
|
||||
|
||||
static void RunMicrotasks(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
Reference in new issue
Block a user