Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 87fd6dd1eafd8a66987994fe7996c3b69feffb65
https://github.com/WebKit/WebKit/commit/87fd6dd1eafd8a66987994fe7996c3b69feffb65
Author: Geoffrey Garen <[email protected]>
Date: 2025-12-10 (Wed, 10 Dec 2025)
Changed paths:
M Source/WTF/wtf/HashTable.h
M Source/WTF/wtf/ListHashSet.h
M Source/WTF/wtf/WeakPtr.h
M Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp
Log Message:
-----------
Adopt isReleasedWeakValue in WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=303711
<rdar://problem/166015837>
Reviewed by Ryosuke Niwa.
This is a step toward a more efficient weak pointer.
The isReleasedWeakValue function makes HashTable responsible for shrinking the
table when it accumulates too many weak nulls.
ListHashSet was not compatible with this strategy. It depended on being notified
when an item was removed so that it could unlink and delete the item's linked
list node.
Changed ListHashSet to use a Linux-style sentinel / circular list. This has the
nice property that individual nodes can remove themselves from the list without
maintaining a back-pointer to the list owner.
Now the hash table owns the list nodes and destruction is automatic: Removing a
node deletes it, which removes it from the list.
Canonical link: https://commits.webkit.org/304265@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications