Use node::NodePlatform instead of v8::platform in atom::NodeDebugger

This commit is contained in:
Aleksei Kuzmin 2017-11-03 12:01:34 +03:00 committed by Cheng Zhao
parent ad732b45d2
commit 1cf95d2a26
3 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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<v8::Platform> platform_;
std::unique_ptr<node::NodePlatform> platform_;
DISALLOW_COPY_AND_ASSIGN(NodeDebugger);
};

View file

@ -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_