When a web view is loading and its Web Content process crashes, if the navigation delegate initiates a new load from -webViewWebContentProcessDidTerminate:, then the PageLoadingState’s isLoading() never transitions to false. As a result, NavigationState::didChangeIsLoading doesn’t get called, and as a result of that, we fail to obtain an activity token for the new process, and as a result, the process may fail to receive a background assertion (if the web view is offscreen) and will fail to start the load.
<rdar://problem/29778369>
Created attachment 300586 [details] testcase that doesn't repro
Comment on attachment 300586 [details] testcase that doesn't repro View in context: https://bugs.webkit.org/attachment.cgi?id=300586&action=review > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/NavigateInsideCrashCallback.mm:84 > + [webView loadRequest:request]; > + TestWebKitAPI::Util::run(&didFinishNavigation); > + > + [webView _killWebContentProcess]; This appears to cause the crash after the web view is no longer loading, so it is not reproducing the conditions in the description of the bug.
(In reply to comment #3) > Comment on attachment 300586 [details] > testcase that doesn't repro > > View in context: > https://bugs.webkit.org/attachment.cgi?id=300586&action=review > > > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/NavigateInsideCrashCallback.mm:84 > > + [webView loadRequest:request]; > > + TestWebKitAPI::Util::run(&didFinishNavigation); > > + > > + [webView _killWebContentProcess]; > > This appears to cause the crash after the web view is no longer loading, so > it is not reproducing the conditions in the description of the bug. Ahhhh, I misread that part! Thank you.