diff options
author | Eugene Ostroukhov <eostroukhov@chromium.org> | 2018-05-23 00:20:24 +0300 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-05-24 00:05:38 +0300 |
commit | 92dd9b59eb0c2146c7869dfda4b935c1ce663f10 (patch) | |
tree | b279f2205a6fc86c997fbcaa2f09d60dfc42b555 /src | |
parent | 5886b7826cbfbe4cc07223bc01deb16962ec9094 (diff) |
inspector: get rid of the make_unique
PR-URL: https://github.com/nodejs/node/pull/20895
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/inspector/tracing_agent.cc | 6 | ||||
-rw-r--r-- | src/inspector_agent.cc | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/inspector/tracing_agent.cc b/src/inspector/tracing_agent.cc index 2d98fa1ee52..c0425aab29d 100644 --- a/src/inspector/tracing_agent.cc +++ b/src/inspector/tracing_agent.cc @@ -56,7 +56,7 @@ TracingAgent::~TracingAgent() { } void TracingAgent::Wire(UberDispatcher* dispatcher) { - frontend_ = std::make_unique<NodeTracing::Frontend>(dispatcher->channel()); + frontend_.reset(new NodeTracing::Frontend(dispatcher->channel())); NodeTracing::Dispatcher::wire(dispatcher, this); } @@ -77,7 +77,9 @@ DispatchResponse TracingAgent::start( return DispatchResponse::Error("At least one category should be enabled"); trace_writer_ = env_->tracing_agent()->AddClient( - categories_set, std::make_unique<InspectorTraceWriter>(frontend_.get())); + categories_set, + std::unique_ptr<InspectorTraceWriter>( + new InspectorTraceWriter(frontend_.get()))); return DispatchResponse::OK(); } diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 50aa23b63cd..162bc6770e5 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -198,8 +198,8 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel, std::unique_ptr<InspectorSessionDelegate> delegate) : delegate_(std::move(delegate)) { session_ = inspector->connect(1, this, StringView()); - node_dispatcher_ = std::make_unique<protocol::UberDispatcher>(this); - tracing_agent_ = std::make_unique<protocol::TracingAgent>(env); + node_dispatcher_.reset(new protocol::UberDispatcher(this)); + tracing_agent_.reset(new protocol::TracingAgent(env)); tracing_agent_->Wire(node_dispatcher_.get()); } |