Use node::NodePlatform instead of v8::platform in atom::NodeDebugger
This commit is contained in:
parent
ad732b45d2
commit
1cf95d2a26
3 changed files with 7 additions and 6 deletions
|
@ -36,7 +36,10 @@ void NodeDebugger::Start() {
|
||||||
if (options.inspector_enabled()) {
|
if (options.inspector_enabled()) {
|
||||||
// Use custom platform since the gin platform does not work correctly
|
// Use custom platform since the gin platform does not work correctly
|
||||||
// with node's inspector agent
|
// 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
|
// Set process._debugWaitConnect if --inspect-brk was specified to stop
|
||||||
// the debugger on the first line
|
// the debugger on the first line
|
||||||
|
|
|
@ -11,10 +11,7 @@
|
||||||
|
|
||||||
namespace node {
|
namespace node {
|
||||||
class Environment;
|
class Environment;
|
||||||
}
|
class NodePlatform;
|
||||||
|
|
||||||
namespace v8 {
|
|
||||||
class Platform;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
@ -29,7 +26,7 @@ class NodeDebugger {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
node::Environment* env_;
|
node::Environment* env_;
|
||||||
std::unique_ptr<v8::Platform> platform_;
|
std::unique_ptr<node::NodePlatform> platform_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NodeDebugger);
|
DISALLOW_COPY_AND_ASSIGN(NodeDebugger);
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,5 +31,6 @@
|
||||||
#include "vendor/node/src/node_buffer.h"
|
#include "vendor/node/src/node_buffer.h"
|
||||||
#include "vendor/node/src/node_debug_options.h"
|
#include "vendor/node/src/node_debug_options.h"
|
||||||
#include "vendor/node/src/node_internals.h"
|
#include "vendor/node/src/node_internals.h"
|
||||||
|
#include "vendor/node/src/node_platform.h"
|
||||||
|
|
||||||
#endif // ATOM_COMMON_NODE_INCLUDES_H_
|
#endif // ATOM_COMMON_NODE_INCLUDES_H_
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue