Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15b191da20fcceee30cd9cb3b1e98c77ffe2b565
      
https://github.com/WebKit/WebKit/commit/15b191da20fcceee30cd9cb3b1e98c77ffe2b565
  Author: Jer Noble <[email protected]>
  Date:   2024-04-06 (Sat, 06 Apr 2024)

  Changed paths:
    M Source/WebKit/UIProcess/ApplicationStateTracker.h
    M Source/WebKit/UIProcess/ApplicationStateTracker.mm

  Log Message:
  -----------
  REGRESSION(276009@main): Crash in 
ApplicationStateTracker::applicationDidEnterBackground()
https://bugs.webkit.org/show_bug.cgi?id=272241
rdar://125895046

Reviewed by Eric Carlson.

>From crash reports, it appears that the NSNotificationCenter observers are 
>being called after
the ApplicationStateTracker itself has been destroyed. Ensure these observers 
are all
unregistered upon destruction, and additionally protect against the observers 
being called
after unregistration by passing a WeakPtr into the observer's lambda.

* Source/WebKit/UIProcess/ApplicationStateTracker.h:
* Source/WebKit/UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
(WebKit::ApplicationStateTracker::removeAllObservers):
(WebKit::ApplicationStateTracker::setScene):
(WebKit::ApplicationStateTracker::setViewController):

Canonical link: https://commits.webkit.org/277170@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

Reply via email to