[webkit-changes] [WebKit/WebKit] e5ee29: Cherry pick ebefbab, rdar://101872145

Patrick Angle noreply at github.com
Wed Nov 2 18:25:55 PDT 2022


  Branch: refs/heads/safari-7615.1.11-branch
  Home:   https://github.com/WebKit/WebKit
  Commit: e5ee29f54fedbefad76b7ff5bf4555389829c694
      https://github.com/WebKit/WebKit/commit/e5ee29f54fedbefad76b7ff5bf4555389829c694
  Author: Patrick Angle <pangle at apple.com>
  Date:   2022-11-02 (Wed, 02 Nov 2022)

  Changed paths:
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm

  Log Message:
  -----------
  Cherry pick ebefbab, rdar://101872145

WebDriver: [Cocoa] Regression(255359 at main) Exception when deleting remote automation session
https://bugs.webkit.org/show_bug.cgi?id=247384
rdar://101872145

When running a WebDriver session on macOS Monterey, we are failing to stop observing listeners on the window, resulting
in an exception. This occurs because we no longer strongly hold a reference to the window anywhere when moving from
`-[WKWindowVisibilityObserver stopObserving:]` to `-[WKWindowVisibilityObserver _observeWindow:]`, which instead only
uses the weak reference to the window for removing the observers. Instead, we should keep the removing of the observers
in the scope where we know we still have a window.

This is observable on macOS Monterey when attempting to close a remote automation session (WebDriver).

* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(-[WKWindowVisibilityObserver _observeWindow:]): Deleted.

Canonical link: https://commits.webkit.org/255891.10@safari-7615.1.11-branch




More information about the webkit-changes mailing list