Skip to content

Commit

Permalink
Update GetForegroundTaskRunner calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Pierre-doray committed Aug 30, 2024
1 parent 442f23b commit af26a32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/cctest/test_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class RepostingTask : public v8::Task {
if (repost_count_ > 0) {
--repost_count_;
std::shared_ptr<v8::TaskRunner> task_runner =
platform_->GetForegroundTaskRunner(isolate_);
platform_->GetForegroundTaskRunner(
isolate_,
v8::TaskPriority::kUserBlocking);
task_runner->PostTask(std::make_unique<RepostingTask>(
repost_count_, run_count_, isolate_, platform_));
}
Expand All @@ -46,7 +48,7 @@ TEST_F(PlatformTest, SkipNewTasksInFlushForegroundTasks) {
Env env {handle_scope, argv};
int run_count = 0;
std::shared_ptr<v8::TaskRunner> task_runner =
platform->GetForegroundTaskRunner(isolate_);
platform->GetForegroundTaskRunner(isolate_, v8::TaskPriority::kUserBlocking);
task_runner->PostTask(
std::make_unique<RepostingTask>(2, &run_count, isolate_, platform.get()));
EXPECT_TRUE(platform->FlushForegroundTasks(isolate_));
Expand Down

0 comments on commit af26a32

Please sign in to comment.