Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6cf979a79f7bb78c0635ff43f02282d78137583e
      
https://github.com/WebKit/WebKit/commit/6cf979a79f7bb78c0635ff43f02282d78137583e
  Author: Dan Hecht <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M Source/WebCore/bindings/js/WebCoreJSClientData.cpp
    M Source/WebCore/bindings/js/WebCoreJSClientData.h

  Log Message:
  -----------
  Stop leaking a JSHeapData per VM, and remove its useGlobalGC singleton
https://bugs.webkit.org/show_bug.cgi?id=326147
rdar://189043601

Reviewed by Keith Miller and Yusuke Suzuki.

247473@main moved WebCore's IsoSubspaces from JSVMClientData into a separate
JSHeapData, as a first step toward a top-down global GC migration in which
every VM shares one Heap.

Nothing owns the per-VM JSHeapData that the default path creates, so every VM
destroyed, such as a worker's, leaks one along with its subspaces.

The GlobalGC work now takes a bottom-up approach instead: each VM keeps its
own Heap, and the aim is for a single collection to cover several Heaps.
Remove the singleton, which is this outdated use of the useGlobalGC flag.

Have JSVMClientData own its JSHeapData, which restores the subspaces' lifetime
from before 247473@main. It is destroyed after the client subspaces, which
point into its subspaces, and after Heap::shutDown() has freed the Heap's
blocks.

* Source/WebCore/bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):
(WebCore::JSHeapData::ensureHeapData): Deleted.
* Source/WebCore/bindings/js/WebCoreJSClientData.h:
(WebCore::JSVMClientData::heapData):

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



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

Reply via email to