[webkit-changes] [WebKit/WebKit] 7c0a83: Improve safety of WeakPtr / WeakRef
Chris Dumez
noreply at github.com
Mon Dec 23 10:08:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7c0a83ba7edeb2ddd95c97596155fec08f2340a8
https://github.com/WebKit/WebKit/commit/7c0a83ba7edeb2ddd95c97596155fec08f2340a8
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-12-23 (Mon, 23 Dec 2024)
Changed paths:
M Source/WTF/wtf/WeakPtr.h
M Source/WTF/wtf/WeakRef.h
M Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp
Log Message:
-----------
Improve safety of WeakPtr / WeakRef
https://bugs.webkit.org/show_bug.cgi?id=285084
Reviewed by Darin Adler.
Add release assertions to guard against null dererefence, given that
it is undefined behavior. This tested as performance neutral.
Also fix WeakPtr null dereference in RenderTreeBuilder::MultiColumn::restoreColumnSpannersForContainer()
that was found by the new assertions. It was covered by the following test:
- fast/multicol/last-set-crash.html
* Source/WTF/wtf/WeakPtr.h:
(WTF::WeakPtr::operator-> const):
(WTF::WeakPtr::operator* const):
* Source/WTF/wtf/WeakRef.h:
(WTF::WeakRef::ptr const):
(WTF::WeakRef::get const):
Canonical link: https://commits.webkit.org/288250@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list