Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3833620970662cdecfb2e665b9ca0387d8483f2a
      
https://github.com/WebKit/WebKit/commit/3833620970662cdecfb2e665b9ca0387d8483f2a
  Author: Geoffrey Garen <[email protected]>
  Date:   2025-12-01 (Mon, 01 Dec 2025)

  Changed paths:
    M Source/WTF/wtf/ListHashSet.h
    M Source/WTF/wtf/WeakListHashSet.h
    M Source/WTF/wtf/WeakPtr.h
    M Source/WTF/wtf/WeakPtrFactory.h

  Log Message:
  -----------
  Use WeakPtr in WeakListHashSet
https://bugs.webkit.org/show_bug.cgi?id=303248
<rdar://problem/165539434>

Reviewed by David Kilzer.

This removes the need for WeakListHashSet to be a friend to WeakPtr
and WeakPtrFactory.

This is also a step toward a more efficient WeakPtr.

I had to change WeakListHashSet::removeNullReferences() to use
ListHashSet::removeIf() instead of a ListHashSet::iterator. An iterator for a
null reference holds nullptr now, so there's no way to look up its
corresponding hash table bucket.

* Source/WTF/wtf/ListHashSet.h:
(WTF::U>::removeIf):
* Source/WTF/wtf/WeakListHashSet.h:
(WTF::containerSize):
(WTF::copyToVector):
* Source/WTF/wtf/WeakPtr.h:
* Source/WTF/wtf/WeakPtrFactory.h:

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



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

Reply via email to