You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://bugs.webkit.org/show_bug.cgi?id=296689
Reviewed by Chris Dumez.
When building an empty Box you can end up with an empty RefPtr. We should ensure it's valid before accessing it.
Test: Tools/TestWebKitAPI/Tests/WTF/BoxPtr.cpp
* Source/WTF/wtf/Box.h:
(WTF::Box::isValid const):
(WTF::Box::get const):
(WTF::Box::operator* const):
(WTF::Box::operator-> const):
(WTF::Box::operator bool const):
* Tools/TestWebKitAPI/Tests/WTF/BoxPtr.cpp:
(TestWebKitAPI::BoxPtrClassTest::method):
(TestWebKitAPI::boxPtrClassTestDeleter):
(TestWebKitAPI::TEST(WTF_BoxPtr, NoCrash)):
Canonical link: https://commits.webkit.org/300573@main
0 commit comments