GCC Code Coverage Report
Directory: ../ Exec Total Coverage
File: /home/iojs/build/workspace/node-test-commit-linux-coverage-daily/nodes/benchmark/out/../src/inspector/runtime_agent.cc Lines: 10 15 66.7 %
Date: 2021-02-19 04:08:54 Branches: 3 6 50.0 %

Line Branch Exec Source
1
#include "runtime_agent.h"
2
3
#include "env-inl.h"
4
#include "inspector_agent.h"
5
6
namespace node {
7
namespace inspector {
8
namespace protocol {
9
10
145
RuntimeAgent::RuntimeAgent()
11
145
  : notify_when_waiting_for_disconnect_(false) {}
12
13
145
void RuntimeAgent::Wire(UberDispatcher* dispatcher) {
14
145
  frontend_ = std::make_unique<NodeRuntime::Frontend>(dispatcher->channel());
15
145
  NodeRuntime::Dispatcher::wire(dispatcher, this);
16
145
}
17
18
DispatchResponse RuntimeAgent::notifyWhenWaitingForDisconnect(bool enabled) {
19
  notify_when_waiting_for_disconnect_ = enabled;
20
  return DispatchResponse::OK();
21
}
22
23
145
bool RuntimeAgent::notifyWaitingForDisconnect() {
24
145
  if (notify_when_waiting_for_disconnect_) {
25
    frontend_->waitingForDisconnect();
26
    return true;
27
  }
28
145
  return false;
29
}
30
}  // namespace protocol
31
}  // namespace inspector
32

366
}  // namespace node