Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9b3f38967bcdfcb722cb81f90660e478bbb4eeea
https://github.com/WebKit/WebKit/commit/9b3f38967bcdfcb722cb81f90660e478bbb4eeea
Author: Chris Dumez <[email protected]>
Date: 2023-06-12 (Mon, 12 Jun 2023)
Changed paths:
M Source/WebKit/Shared/UserInterfaceIdiom.mm
Log Message:
-----------
unset std::optional may be dereferenced in currentUserInterfaceIdiom()
https://bugs.webkit.org/show_bug.cgi?id=257966
rdar://110626776
Reviewed by Wenson Hsieh.
updateCurrentUserInterfaceIdiom() doesn't set s_currentUserInterfaceIdiom
if s_currentUserInterfaceIdiom was previously unset and the new value is
UserInterfaceIdiom::Default. Therefore, use
value_or(UserInterfaceIdiom::Default)
instead of dereferencing s_currentUserInterfaceIdiom unconditionally.
* Source/WebKit/Shared/UserInterfaceIdiom.mm:
(WebKit::currentUserInterfaceIdiom):
Canonical link: https://commits.webkit.org/265076@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes