diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index f9bfa0e0c86f..27c7d83c8a9d 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -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_); @@ -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); diff --git a/src/node_watchdog.h b/src/node_watchdog.h index 096e347d7b3f..a4a31b3a3e9e 100644 --- a/src/node_watchdog.h +++ b/src/node_watchdog.h @@ -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); ~Watchdog(); v8::Isolate* isolate() { return isolate_; } @@ -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;