Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7c0a83ba7edeb2ddd95c97596155fec08f2340a8
https://github.com/WebKit/WebKit/commit/7c0a83ba7edeb2ddd95c97596155fec08f2340a8
Author: Chris Dumez <[email protected]>
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes