cppgc: Fix standalone unittests
When runnig cppgc_unittests in a cppgc standalone build, the test ConcurrentSweeperTest.IncrementalSweeping fails. This is becuase TestPlatform::RunAllForegroundTasks was actually not running all tasks becasue v8::platform::PumpMessageLoop only runs a single task. Change-Id: Ie68eee369abd12edcf04e697a1d8ca574059d160 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026163 Commit-Queue: Omer Katz <omerkatz@chromium.org> Auto-Submit: Omer Katz <omerkatz@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#84246}
This commit is contained in:
parent
05a80427dc
commit
72c3ab8c22
@ -24,7 +24,8 @@ std::unique_ptr<cppgc::JobHandle> TestPlatform::PostJob(
|
||||
}
|
||||
|
||||
void TestPlatform::RunAllForegroundTasks() {
|
||||
v8::platform::PumpMessageLoop(v8_platform_.get(), kNoIsolate);
|
||||
while (v8::platform::PumpMessageLoop(v8_platform_.get(), kNoIsolate)) {
|
||||
}
|
||||
if (GetForegroundTaskRunner()->IdleTasksEnabled()) {
|
||||
v8::platform::RunIdleTasks(v8_platform_.get(), kNoIsolate,
|
||||
std::numeric_limits<double>::max());
|
||||
|
Loading…
Reference in New Issue
Block a user