summaryrefslogtreecommitdiff
path: root/src/inspector_agent.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspector_agent.cc')
-rw-r--r--src/inspector_agent.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc
index 2520fbdd53..828006ecf2 100644
--- a/src/inspector_agent.cc
+++ b/src/inspector_agent.cc
@@ -502,11 +502,9 @@ class InspectorTimerHandle {
class NodeInspectorClient : public V8InspectorClient {
public:
- NodeInspectorClient(node::Environment* env,
- v8::Platform* platform) : env_(env),
- platform_(platform),
- terminated_(false),
- running_nested_loop_(false) {
+ NodeInspectorClient(node::Environment* env, node::NodePlatform* platform)
+ : env_(env), platform_(platform), terminated_(false),
+ running_nested_loop_(false) {
client_ = V8Inspector::create(env->isolate(), this);
contextCreated(env->context(), "Node.js Main Context");
}
@@ -518,8 +516,7 @@ class NodeInspectorClient : public V8InspectorClient {
terminated_ = false;
running_nested_loop_ = true;
while (!terminated_ && channel_->waitForFrontendMessage()) {
- while (v8::platform::PumpMessageLoop(platform_, env_->isolate()))
- {}
+ platform_->FlushForegroundTasksInternal();
}
terminated_ = false;
running_nested_loop_ = false;
@@ -647,7 +644,7 @@ class NodeInspectorClient : public V8InspectorClient {
private:
node::Environment* env_;
- v8::Platform* platform_;
+ node::NodePlatform* platform_;
bool terminated_;
bool running_nested_loop_;
std::unique_ptr<V8Inspector> client_;
@@ -666,7 +663,7 @@ Agent::Agent(Environment* env) : parent_env_(env),
Agent::~Agent() {
}
-bool Agent::Start(v8::Platform* platform, const char* path,
+bool Agent::Start(node::NodePlatform* platform, const char* path,
const DebugOptions& options) {
path_ = path == nullptr ? "" : path;
debug_options_ = options;