Skip to content

Commit 4709da0

Browse files
jeisingerBethGriggs
authored andcommitted
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: #39470 PR-URL: #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>
1 parent 86ca9a8 commit 4709da0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/cctest/test_environment.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ TEST_F(EnvironmentTest, NestedMicrotaskQueue) {
647647
const v8::HandleScope handle_scope(isolate_);
648648
const Argv argv;
649649

650-
std::unique_ptr<v8::MicrotaskQueue> queue = v8::MicrotaskQueue::New(isolate_);
650+
std::unique_ptr<v8::MicrotaskQueue> queue = v8::MicrotaskQueue::New(
651+
isolate_, v8::MicrotasksPolicy::kExplicit);
651652
v8::Local<v8::Context> context = v8::Context::New(
652653
isolate_, nullptr, {}, {}, {}, queue.get());
653654
node::InitializeContext(context);

0 commit comments

Comments
 (0)