File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -257,8 +257,7 @@ void MainThreadInterface::Post(std::unique_ptr<Request> request) {
257
257
if (isolate_ != nullptr && platform_ != nullptr ) {
258
258
std::shared_ptr<v8::TaskRunner> taskrunner =
259
259
platform_->GetForegroundTaskRunner (isolate_);
260
- taskrunner->PostTask (std::unique_ptr<v8::Task>(
261
- new DispatchMessagesTask (this )));
260
+ taskrunner->PostTask (std::make_unique<DispatchMessagesTask>(this ));
262
261
isolate_->RequestInterrupt ([](v8::Isolate* isolate, void * thread) {
263
262
static_cast <MainThreadInterface*>(thread)->DispatchMessages ();
264
263
}, this );
Original file line number Diff line number Diff line change @@ -865,7 +865,7 @@ void Agent::RequestIoThreadStart() {
865
865
v8::Platform* platform = parent_env_->isolate_data ()->platform ();
866
866
std::shared_ptr<TaskRunner> taskrunner =
867
867
platform->GetForegroundTaskRunner (isolate);
868
- taskrunner->PostTask (std::unique_ptr<Task>( new StartIoTask ( this ) ));
868
+ taskrunner->PostTask (std::make_unique<StartIoTask>( this ));
869
869
isolate->RequestInterrupt (StartIoInterrupt, this );
870
870
uv_async_send (&start_io_thread_async);
871
871
}
You can’t perform that action at this time.
0 commit comments