From 663331c56fb6604859be3d6d2971cd981f332924 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Fri, 18 Oct 2024 22:31:39 -0700 Subject: [PATCH] fix regression in BunJSGlobalObjectDebuggable from most recent webkit upgrade (#14675) --- src/bun.js/bindings/BunDebugger.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bun.js/bindings/BunDebugger.cpp b/src/bun.js/bindings/BunDebugger.cpp index 2a584af958..b57c282de6 100644 --- a/src/bun.js/bindings/BunDebugger.cpp +++ b/src/bun.js/bindings/BunDebugger.cpp @@ -41,6 +41,11 @@ public: { } + static Ref create(JSGlobalObject& globalObject) + { + return adoptRef(*new BunJSGlobalObjectDebuggable(globalObject)); + } + void pauseWaitingForAutomaticInspection() override { } @@ -449,7 +454,8 @@ extern "C" void Bun__ensureDebugger(ScriptExecutionContextIdentifier scriptId, b auto* globalObject = ScriptExecutionContext::getScriptExecutionContext(scriptId)->jsGlobalObject(); globalObject->m_inspectorController = makeUnique(*globalObject, Bun::BunInjectedScriptHost::create()); - globalObject->m_inspectorDebuggable = JSGlobalObjectDebuggable::create(*globalObject); + globalObject->m_inspectorDebuggable = BunJSGlobalObjectDebuggable::create(*globalObject); + globalObject->m_inspectorDebuggable->init(); globalObject->setInspectable(true);