From 78d9f11c43f5e082059d7fe3fd9c10a26847f3b8 Mon Sep 17 00:00:00 2001 From: Archkon <180910180+Archkon@users.noreply.github.com> Date: Wed, 22 Jul 2026 12:46:06 +0800 Subject: [PATCH] src: require watchdog status pointers Remove the nullptr defaults from Watchdog and SigintWatchdog result parameters. Both watchdogs unconditionally dereference these pointers, so callers must explicitly provide valid status storage. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com> --- src/node_watchdog.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/node_watchdog.h b/src/node_watchdog.h index 096e347d7b3f9f..a4a31b3a3e9eee 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;