Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/node_watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ using v8::Value;

Watchdog::Watchdog(v8::Isolate* isolate, uint64_t ms, bool* timed_out)
: isolate_(isolate), timed_out_(timed_out) {
CHECK_NOT_NULL(timed_out);

int rc;
rc = uv_loop_init(&loop_);
Expand Down Expand Up @@ -103,6 +104,7 @@ void Watchdog::Timer(uv_timer_t* timer) {
SigintWatchdog::SigintWatchdog(
v8::Isolate* isolate, bool* received_signal)
: isolate_(isolate), received_signal_(received_signal) {
CHECK_NOT_NULL(received_signal);
Mutex::ScopedLock lock(SigintWatchdogHelper::GetInstanceActionMutex());
// Register this watchdog with the global SIGINT/Ctrl+C listener.
SigintWatchdogHelper::GetInstance()->Register(this);
Expand Down
7 changes: 2 additions & 5 deletions src/node_watchdog.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ enum class SignalPropagation {

class Watchdog {
public:
explicit Watchdog(v8::Isolate* isolate,
uint64_t ms,
bool* timed_out = nullptr);
explicit Watchdog(v8::Isolate* isolate, uint64_t ms, bool* timed_out);
Comment thread
Archkon marked this conversation as resolved.
~Watchdog();
v8::Isolate* isolate() { return isolate_; }

Expand Down Expand Up @@ -75,8 +73,7 @@ class SigintWatchdogBase {

class SigintWatchdog : public SigintWatchdogBase {
public:
explicit SigintWatchdog(v8::Isolate* isolate,
bool* received_signal = nullptr);
explicit SigintWatchdog(v8::Isolate* isolate, bool* received_signal);
~SigintWatchdog();
v8::Isolate* isolate() { return isolate_; }
SignalPropagation HandleSigint() override;
Expand Down
Loading