Skip to content

Commit

Permalink
Update GetForegroundTaskRunner calls (#199)
Browse files Browse the repository at this point in the history
* Update GetForegroundTaskRunner calls

* Format

---------

Co-authored-by: Etienne Pierre-doray <etiennep@chromium.org>
  • Loading branch information
2 people authored and pthier committed Oct 2, 2024
1 parent e854e2f commit e3b5340
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,8 @@ 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 +47,8 @@ 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 e3b5340

Please sign in to comment.