From ec50275b2bc95f67df2a46166f70ec3c9809ed52 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 11 Dec 2018 09:28:22 -0500 Subject: [PATCH] squash! use std::make_unique() --- src/inspector/main_thread_interface.cc | 3 +-- src/inspector_agent.cc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc index 488f638c05f496..2ed6362df53fda 100644 --- a/src/inspector/main_thread_interface.cc +++ b/src/inspector/main_thread_interface.cc @@ -257,8 +257,7 @@ void MainThreadInterface::Post(std::unique_ptr request) { if (isolate_ != nullptr && platform_ != nullptr) { std::shared_ptr taskrunner = platform_->GetForegroundTaskRunner(isolate_); - taskrunner->PostTask(std::unique_ptr( - new DispatchMessagesTask(this))); + taskrunner->PostTask(std::make_unique(this)); isolate_->RequestInterrupt([](v8::Isolate* isolate, void* thread) { static_cast(thread)->DispatchMessages(); }, this); diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 5bb65182517731..2ef964276177be 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -865,7 +865,7 @@ void Agent::RequestIoThreadStart() { v8::Platform* platform = parent_env_->isolate_data()->platform(); std::shared_ptr taskrunner = platform->GetForegroundTaskRunner(isolate); - taskrunner->PostTask(std::unique_ptr(new StartIoTask(this))); + taskrunner->PostTask(std::make_unique(this)); isolate->RequestInterrupt(StartIoInterrupt, this); uv_async_send(&start_io_thread_async); }