diff --git a/src/node_platform.cc b/src/node_platform.cc index c15a95128e9d3f..eb918bdd559c40 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -513,6 +513,12 @@ bool NodePlatform::FlushForegroundTasks(Isolate* isolate) { return per_isolate->FlushForegroundTasksInternal(); } +std::unique_ptr NodePlatform::PostJob(v8::TaskPriority priority, + std::unique_ptr job_task) { + return v8::platform::NewDefaultJobHandle( + this, priority, std::move(job_task), NumberOfWorkerThreads()); +} + bool NodePlatform::IdleTasksEnabled(Isolate* isolate) { return ForIsolate(isolate)->IdleTasksEnabled(); } diff --git a/src/node_platform.h b/src/node_platform.h index dc512ddf08facf..a7139ebdcc28d2 100644 --- a/src/node_platform.h +++ b/src/node_platform.h @@ -154,6 +154,9 @@ class NodePlatform : public MultiIsolatePlatform { double CurrentClockTimeMillis() override; v8::TracingController* GetTracingController() override; bool FlushForegroundTasks(v8::Isolate* isolate) override; + std::unique_ptr PostJob( + v8::TaskPriority priority, + std::unique_ptr job_task) override; void RegisterIsolate(v8::Isolate* isolate, uv_loop_t* loop) override; void RegisterIsolate(v8::Isolate* isolate,