test: ensure microtask queues are not automatically drained

V8 had a bug that in certain cases the default microtask queue was
drained, and this test relies on the behavior.

Backport-PR-URL: https://github.com/nodejs/node/pull/39470
PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Jochen Eisinger authored and Beth Griggs committed 2021-07-29 17:14:29 +01:00
1 parent 86ca9a8a80
commit 4709da0372
1 file changed
+2 -1
+2 -1
View File
@@ -647,7 +647,8 @@ TEST_F(EnvironmentTest, NestedMicrotaskQueue) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
std::unique_ptr<v8::MicrotaskQueue> queue = v8::MicrotaskQueue::New(isolate_);
std::unique_ptr<v8::MicrotaskQueue> queue = v8::MicrotaskQueue::New(
isolate_, v8::MicrotasksPolicy::kExplicit);
v8::Local<v8::Context> context = v8::Context::New(
isolate_, nullptr, {}, {}, {}, queue.get());
node::InitializeContext(context);