diff --git a/src/node_platform.cc b/src/node_platform.cc index c5bdc4d33cc9ca..c5ccf8a3b52710 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -65,13 +65,13 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler { } void PostDelayedTask(std::unique_ptr task, double delay_in_seconds) { - tasks_.Push(std::unique_ptr(new ScheduleTask(this, std::move(task), - delay_in_seconds))); + tasks_.Push(std::make_unique(this, std::move(task), + delay_in_seconds)); uv_async_send(&flush_tasks_); } void Stop() { - tasks_.Push(std::unique_ptr(new StopTask(this))); + tasks_.Push(std::make_unique(this)); uv_async_send(&flush_tasks_); }