Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7807b5ccd64a001648ba0d1cc80d1e236a8e4522
      
https://github.com/WebKit/WebKit/commit/7807b5ccd64a001648ba0d1cc80d1e236a8e4522
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2025-04-10 (Thu, 10 Apr 2025)

  Changed paths:
    M Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  -----------
  Loosen WKWebViewConfiguration checks in UIDelegate::UIClient::createNewPage
https://bugs.webkit.org/show_bug.cgi?id=291346
rdar://148942809

Reviewed by Charlie Wolfe.

In 276636@main I added an additional check on the WKWebViewConfiguration of the 
created
WKWebView that could not be synthesized by SPI.  In 285310@main I removed the 
_relatedWebView
check which had been superseded.  rdar://148942809 contains a record that 
somewhere in
Safari there is a WKWebView being returned that was not created with the given 
configuration.
This reverts the check to how it was last year, only checking that 
_relatedWebView is correct
if site isolation is off.  That should replace a crash with a missing opener.  
Since a missing
opener is also not great, I added a RELEASE_LOG_FAULT to give us the stack of 
where this is
happening so that we can fix it.  I only set openerInfoOfPageBeingOpened in Mac 
Safari because
that is the only user of _relatedWebView where this issue can arise.  It's also 
not technically
a restriction that you can't create another WKWebView during a WKUIDelegate's
createWebViewWithConfiguration call because you could be creating a WKWebView 
to do something
with other than return it from createWebViewWithConfiguration, but in macOS 
Safari we know
it is almost certainly the case that we only create one WKWebView, which means 
the stack we
get from the RELEASE_LOG_FAULT should show us where the bug is.

* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::crashWithUIDelegateClassName):
(WebKit::UIDelegate::UIClient::createNewPage):

Canonical link: https://commits.webkit.org/293537@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to