Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
WebDriver: Automation session terminates during navigation process swap
https://bugs.webkit.org/show_bug.cgi?id=245011 rdar://90824741 Reviewed by Devin Rousso and Brent Fulgham. WebPageProxy::commitProvisionalPage is crashing during some WebDriver sessions due to having a `nullptr` for `m_provisionalPage` after calling `WebPageProxy::resetStateAfterProcessTermination`. This was occuring because we were indiscriminately terminating the WebDriver session at that point, but we should not do so when resetting state for a navigation process swap, as the automation session is very much expected to continue to exist. The reason we end up without a `m_provisionalPage` is because terminating the automation session cleans up (e.g. closes) the windows under automation, which in turn is cleaning up the `m_provisionalPage`, since it will no longer exist once the window is gone. This resolves numerous test crashes in WPT, including encoding/encodeInto.any.serviceworker.html, as well as fixing issues navigating to `youtube.com` and `twitter.com`. * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessTermination): Canonical link: https://commits.webkit.org/254386@main
- Loading branch information