diff --git a/atom/browser/node_debugger.cc b/atom/browser/node_debugger.cc index be3d76bc047d..7f59723d50cd 100644 --- a/atom/browser/node_debugger.cc +++ b/atom/browser/node_debugger.cc @@ -36,7 +36,10 @@ void NodeDebugger::Start() { if (options.inspector_enabled()) { // Use custom platform since the gin platform does not work correctly // with node's inspector agent - platform_.reset(v8::platform::CreateDefaultPlatform()); + platform_.reset(new node::NodePlatform( + /* thread_pool_size */ 0, + env_->event_loop(), + /* tracing_controller */ nullptr)); // Set process._debugWaitConnect if --inspect-brk was specified to stop // the debugger on the first line diff --git a/atom/browser/node_debugger.h b/atom/browser/node_debugger.h index b4eedbcd340c..a1b8e34c9b1c 100644 --- a/atom/browser/node_debugger.h +++ b/atom/browser/node_debugger.h @@ -11,10 +11,7 @@ namespace node { class Environment; -} - -namespace v8 { -class Platform; +class NodePlatform; } namespace atom { @@ -29,7 +26,7 @@ class NodeDebugger { private: node::Environment* env_; - std::unique_ptr platform_; + std::unique_ptr platform_; DISALLOW_COPY_AND_ASSIGN(NodeDebugger); }; diff --git a/atom/common/node_includes.h b/atom/common/node_includes.h index 5e9c3fdbec8c..76ce95a87644 100644 --- a/atom/common/node_includes.h +++ b/atom/common/node_includes.h @@ -31,5 +31,6 @@ #include "vendor/node/src/node_buffer.h" #include "vendor/node/src/node_debug_options.h" #include "vendor/node/src/node_internals.h" +#include "vendor/node/src/node_platform.h" #endif // ATOM_COMMON_NODE_INCLUDES_H_