diff options
Diffstat (limited to 'src/node_worker.cc')
-rw-r--r-- | src/node_worker.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_worker.cc b/src/node_worker.cc index c5ccb74a6f..6f290c3e2a 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -10,6 +10,7 @@ #include "inspector/worker_inspector.h" // ParentInspectorHandle #endif +#include <memory> #include <string> #include <vector> @@ -117,7 +118,7 @@ Worker::Worker(Environment* env, return; } - child_port_data_.reset(new MessagePortData(nullptr)); + child_port_data_ = std::make_unique<MessagePortData>(nullptr); MessagePort::Entangle(parent_port_, child_port_data_.get()); object()->Set(env->context(), |