Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fff0ad4731a7aa82055ab033829f8e13cc09f3eb
https://github.com/WebKit/WebKit/commit/fff0ad4731a7aa82055ab033829f8e13cc09f3eb
Author: Jer Noble <[email protected]>
Date: 2024-04-05 (Fri, 05 Apr 2024)
Changed paths:
M Source/WebKit/UIProcess/ApplicationStateTracker.mm
Log Message:
-----------
REGRESSION(276009@main) NSRangeException thrown from
-[WKUIWindowSceneObserver setObservedWindow:]
https://bugs.webkit.org/show_bug.cgi?id=272250
rdar://125653988
Reviewed by Eric Carlson.
Crashlogs say this NSRangeException is thrown when trying to call
-removeObserver:withKeyPath: on _window,
with the error message saying the caller is not registered as an observer in
the first place.
To be absolutely sure that we aren't accidentally messaging nil when
registering ourselves as an observer,
store both the new window and old window in RetainPtrs. There doesn't appear to
be a code path by which
we can accidentally un-register twice, but just in case, wrap the call to
-removeObserver:withKeyPath: in
a @try/@catch block.
* Source/WebKit/UIProcess/ApplicationStateTracker.mm:
(-[WKUIWindowSceneObserver setObservedWindow:]):
Canonical link: https://commits.webkit.org/277145@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