src: reuse std::make_unique

Ref: 283a967e35

PR-URL: https://github.com/nodejs/node/pull/24132
Refs: 283a967e35
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
This commit is contained in:
alyssaq 2018-11-06 14:34:52 +00:00 committed by Rich Trott
parent 27cdb36b10
commit 08bd8233be

View File

@ -475,11 +475,9 @@ class NodeInspectorClient : public V8InspectorClient {
bool prevent_shutdown) { bool prevent_shutdown) {
events_dispatched_ = true; events_dispatched_ = true;
int session_id = next_session_id_++; int session_id = next_session_id_++;
// TODO(addaleax): Revert back to using make_unique once we get issues channels_[session_id] =
// with CI resolved (i.e. revert the patch that added this comment). std::make_unique<ChannelImpl>(env_, client_, getWorkerManager(),
channels_[session_id].reset( std::move(delegate), prevent_shutdown);
new ChannelImpl(env_, client_, getWorkerManager(),
std::move(delegate), prevent_shutdown));
return session_id; return session_id;
} }