Commit 10b4a6c8 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Purge web view on renderer crash.

On iOS 11 WKWebView does not repaint after crash and reload. Recreating
web view fixes the issue.

It seems like the problem is not reproducible if web view scroll view
remain in the default position, but it's impossible to check if web view
was scrolled once the renderer has crashed. Recreating web view should
not have visible performance implications, so it will be more reliable to
purge it unconditionally if renderer has crashed.

Bug: 770914
Change-Id: I84feede9e54e4371aaf36b47db0fc9878e7518a9
Reviewed-on: https://chromium-review.googlesource.com/727401
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510101}
parent 9f296a1b
...@@ -3958,6 +3958,12 @@ registerLoadRequestForURL:(const GURL&)requestURL ...@@ -3958,6 +3958,12 @@ registerLoadRequestForURL:(const GURL&)requestURL
_webProcessCrashed = YES; _webProcessCrashed = YES;
_webStateImpl->CancelDialogs(); _webStateImpl->CancelDialogs();
_webStateImpl->OnRenderProcessGone(); _webStateImpl->OnRenderProcessGone();
if (@available(iOS 11, *)) {
// On iOS 11 WKWebView does not repaint after crash and reload. Recreating
// web view fixes the issue. TODO(crbug.com/770914): Remove this workaround
// once rdar://35063950 is fixed.
[self removeWebView];
}
} }
- (web::WKWebViewConfigurationProvider&)webViewConfigurationProvider { - (web::WKWebViewConfigurationProvider&)webViewConfigurationProvider {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment