Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c51e9ffac777f72df41726bdc86e3e0be9f67844
      
https://github.com/WebKit/WebKit/commit/c51e9ffac777f72df41726bdc86e3e0be9f67844
  Author: Yijia Huang <[email protected]>
  Date:   2026-04-04 (Sat, 04 Apr 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebProcessProxy.cpp

  Log Message:
  -----------
  [JSC][WASM][Debugger] Fix WasmDebuggerDebuggable leak when process shuts down
https://bugs.webkit.org/show_bug.cgi?id=311491
rdar://169471661

Reviewed by Mark Lam.

destroyWasmDebuggerTarget() was guarded by JSC::Options::enableWasmDebugger(),
but createWasmDebuggerTarget() is also called when 
m_createWasmDebuggerDebuggable
is true (set via EnableWebAssemblyDebugger::Yes). When the latter path created 
the
debuggable, shutDown() would skip destroying it, leaving 
m_wasmDebuggerDebuggable
registered with RemoteInspector until the WebProcessProxy was eventually 
destroyed.

This caused WasmDebugger debuggable counts to exceed Webpage debuggable counts
during tab manipulation, because WebPageDebuggable is torn down on tab close 
while
the cached WebProcessProxy held a lingering WasmDebuggerDebuggable registration.

Fix: replace the flag-derived guard with a direct existence check — if the
debuggable was created, destroy it.

Canonical link: https://commits.webkit.org/310578@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to