NEW 166392
[iOS] Background assertion not taken if Web process crashes while loading and the navigation delegate initiates a new load from under -webViewWebContentProcessDidTerminate:
https://bugs.webkit.org/show_bug.cgi?id=166392
Summary [iOS] Background assertion not taken if Web process crashes while loading and...
mitz
Reported 2016-12-21 14:01:02 PST
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.
Attachments
testcase that doesn't repro (9.22 KB, patch)
2017-02-03 18:28 PST, Tim Horton
no flags
mitz
Comment 1 2016-12-21 14:49:04 PST
Tim Horton
Comment 2 2017-02-03 18:28:42 PST
Created attachment 300586 [details] testcase that doesn't repro
mitz
Comment 3 2017-02-03 19:32:38 PST
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.
Tim Horton
Comment 4 2017-02-03 23:40:57 PST
(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.
Note You need to log in before you can comment on or make changes to this bug.