aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/heap/incremental-marking-job.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/heap/incremental-marking-job.cc')
-rw-r--r--deps/v8/src/heap/incremental-marking-job.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/v8/src/heap/incremental-marking-job.cc b/deps/v8/src/heap/incremental-marking-job.cc
index 7583aaaadf..96eff0508e 100644
--- a/deps/v8/src/heap/incremental-marking-job.cc
+++ b/deps/v8/src/heap/incremental-marking-job.cc
@@ -24,8 +24,9 @@ void IncrementalMarkingJob::ScheduleTask(Heap* heap) {
if (!task_pending_ && !heap->IsTearingDown()) {
v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(heap->isolate());
task_pending_ = true;
- auto task = new Task(heap->isolate(), this);
- V8::GetCurrentPlatform()->CallOnForegroundThread(isolate, task);
+ auto taskrunner =
+ V8::GetCurrentPlatform()->GetForegroundTaskRunner(isolate);
+ taskrunner->PostTask(base::make_unique<Task>(heap->isolate(), this));
}
}