Skip to content

Commit

Permalink
squash! use std::make_unique()
Browse files Browse the repository at this point in the history
  • Loading branch information
cjihrig committed Dec 11, 2018
1 parent 590a500 commit ec50275
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/inspector/main_thread_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ void MainThreadInterface::Post(std::unique_ptr<Request> request) {
if (isolate_ != nullptr && platform_ != nullptr) {
std::shared_ptr<v8::TaskRunner> taskrunner =
platform_->GetForegroundTaskRunner(isolate_);
taskrunner->PostTask(std::unique_ptr<v8::Task>(
new DispatchMessagesTask(this)));
taskrunner->PostTask(std::make_unique<DispatchMessagesTask>(this));
isolate_->RequestInterrupt([](v8::Isolate* isolate, void* thread) {
static_cast<MainThreadInterface*>(thread)->DispatchMessages();
}, this);
Expand Down
2 changes: 1 addition & 1 deletion src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ void Agent::RequestIoThreadStart() {
v8::Platform* platform = parent_env_->isolate_data()->platform();
std::shared_ptr<TaskRunner> taskrunner =
platform->GetForegroundTaskRunner(isolate);
taskrunner->PostTask(std::unique_ptr<Task>(new StartIoTask(this)));
taskrunner->PostTask(std::make_unique<StartIoTask>(this));
isolate->RequestInterrupt(StartIoInterrupt, this);
uv_async_send(&start_io_thread_async);
}
Expand Down

0 comments on commit ec50275

Please sign in to comment.