From 22ca21dce547289548742a8c87f35f6a4e8b4bf2 Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Fri, 13 Feb 2026 13:40:20 -0800 Subject: [PATCH] cleanup: use Bun__setRuntimeInspectorActivated in STW path too --- src/bun.js/bindings/BunDebugger.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/bun.js/bindings/BunDebugger.cpp b/src/bun.js/bindings/BunDebugger.cpp index 80fba4e2d6..baa0de4534 100644 --- a/src/bun.js/bindings/BunDebugger.cpp +++ b/src/bun.js/bindings/BunDebugger.cpp @@ -985,14 +985,8 @@ JSC::StopTheWorldStatus Bun__jsDebuggerCallback(JSC::VM& vm, JSC::StopTheWorldEv // Phase 1: Activate inspector if requested (SIGUSR1 handler sets a flag) bool activated = Bun__activateInspector(); - if (activated) { - Bun::runtimeInspectorActivated.store(true); - // Enable polling traps so that NeedDebuggerBreak is checked at every - // loop back-edge in all JIT tiers. The overhead is acceptable since - // we're now in debugging mode. recompileAllJSFunctions() (called during - // debugger attach) will recompile all code with the new polling trap checks. - JSC::Options::usePollingTraps() = true; - } + if (activated) + Bun__setRuntimeInspectorActivated(); // Phase 2: Process pending connections for THIS VM. // doConnect must run on the connection's owning VM thread.