Skip to content

Commit

Permalink
test: ensure microtask queues are not automatically drained
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jeisinger authored and BethGriggs committed Jul 29, 2021
1 parent 86ca9a8 commit 4709da0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/cctest/test_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4709da0

Please sign in to comment.