From 3138c8521857ab90084ae7f81a2e3e8e89a4eec0 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 13 Nov 2017 11:43:08 +0900 Subject: [PATCH] Fix linking problem with NodePlatform --- atom/browser/node_debugger.cc | 7 ++++--- atom/browser/node_debugger.h | 4 +--- vendor/node | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/atom/browser/node_debugger.cc b/atom/browser/node_debugger.cc index 9ffd449dd954..769bdfbbd247 100644 --- a/atom/browser/node_debugger.cc +++ b/atom/browser/node_debugger.cc @@ -17,6 +17,7 @@ NodeDebugger::NodeDebugger(node::Environment* env) : env_(env) { } NodeDebugger::~NodeDebugger() { + FreePlatform(platform_); } void NodeDebugger::Start() { @@ -37,9 +38,9 @@ void NodeDebugger::Start() { // Use custom platform since the gin platform does not work correctly // with node's inspector agent. We use the default thread pool size // specified by node.cc - platform_.reset(new node::NodePlatform( + platform_ = node::CreatePlatform( /* thread_pool_size */ 4, env_->event_loop(), - /* tracing_controller */ nullptr)); + /* tracing_controller */ nullptr); // Set process._debugWaitConnect if --inspect-brk was specified to stop // the debugger on the first line @@ -48,7 +49,7 @@ void NodeDebugger::Start() { process.Set("_breakFirstLine", true); } - inspector->Start(platform_.get(), nullptr, options); + inspector->Start(platform_, nullptr, options); } } diff --git a/atom/browser/node_debugger.h b/atom/browser/node_debugger.h index a1b8e34c9b1c..609a4dda3c53 100644 --- a/atom/browser/node_debugger.h +++ b/atom/browser/node_debugger.h @@ -5,8 +5,6 @@ #ifndef ATOM_BROWSER_NODE_DEBUGGER_H_ #define ATOM_BROWSER_NODE_DEBUGGER_H_ -#include - #include "base/macros.h" namespace node { @@ -26,7 +24,7 @@ class NodeDebugger { private: node::Environment* env_; - std::unique_ptr platform_; + node::NodePlatform* platform_; DISALLOW_COPY_AND_ASSIGN(NodeDebugger); }; diff --git a/vendor/node b/vendor/node index 766932f73a85..d969dd20b689 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 766932f73a85c22046884081ca65d9475d361d84 +Subproject commit d969dd20b689b14e7bbda6be03b361638809ef55