Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 648f84844d05410eba37da2758244db02cf17cb8
      
https://github.com/WebKit/WebKit/commit/648f84844d05410eba37da2758244db02cf17cb8
  Author: Chris Dumez <[email protected]>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M Source/WebKit/UIProcess/FrameLoadState.cpp
    M Source/WebKit/UIProcess/PageLoadState.cpp

  Log Message:
  -----------
  Crash under NavigationState::NavigationClient::didCommitNavigation()
https://bugs.webkit.org/show_bug.cgi?id=261172
rdar://113459568

Reviewed by Sihui Liu.

The crash in the wild seems to indicate that WKFrameCopyURL() may return null
when called from the didCommitLoadForFrame() navigation delegate. It seems
unexpected for the committed URL to be null when we've just committed a load
in the frame.

I have not been able to reproduce the issue with our tests or regular browsing
so I am adding assertions and defaulting the committed URL to "about:blank" if
it is null upon commit.

* Source/WebKit/UIProcess/FrameLoadState.cpp:
(WebKit::FrameLoadState::didExplicitOpen):
(WebKit::FrameLoadState::didCommitLoad):
(WebKit::FrameLoadState::didSameDocumentNotification):
* Source/WebKit/UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to