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:
parent
27cdb36b10
commit
08bd8233be
@ -475,11 +475,9 @@ class NodeInspectorClient : public V8InspectorClient {
|
||||
bool prevent_shutdown) {
|
||||
events_dispatched_ = true;
|
||||
int session_id = next_session_id_++;
|
||||
// TODO(addaleax): Revert back to using make_unique once we get issues
|
||||
// with CI resolved (i.e. revert the patch that added this comment).
|
||||
channels_[session_id].reset(
|
||||
new ChannelImpl(env_, client_, getWorkerManager(),
|
||||
std::move(delegate), prevent_shutdown));
|
||||
channels_[session_id] =
|
||||
std::make_unique<ChannelImpl>(env_, client_, getWorkerManager(),
|
||||
std::move(delegate), prevent_shutdown);
|
||||
return session_id;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user