-
Justin Cohen authored
Preload appears to trigger an edge-case crash in WebKit when a restore is triggered and cancelled before it can complete. This isn't specific to preload, but is very easy to trigger in preload. As a speculative fix, if a preload is in restore, don't destroy it until after restore is complete. This logic should really belong in WebState itself, so any attempt to destroy a WebState during restore will trigger this logic. Even better, this edge case crash should be fixed in WebKit: https://bugs.webkit.org/show_bug.cgi?id=217440. The crash in WebKit appears to be related to IPC throttling. Session restore can create a large number of IPC calls, which can then be throttled. It seems if the WKWebView is destroyed with this backlog of IPC calls, sometimes WebKit crashes. See crbug.com/1032928 for an explanation for how to trigger this crash. Note the timer should only be called if for some reason session restoration fails to complete -- thus preventing a WebState leak. Bug: 1032928 Change-Id: I217918437d5cdc6f610f3331634791699dd678ea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461571Reviewed-by:
Robert Kaplow <rkaplow@chromium.org> Reviewed-by:
Rohit Rao <rohitrao@chromium.org> Reviewed-by:
Ali Juma <ajuma@chromium.org> Reviewed-by:
Eugene But <eugenebut@chromium.org> Reviewed-by:
Gauthier Ambard <gambard@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org> Auto-Submit: Justin Cohen <justincohen@chromium.org> Cr-Commit-Position: refs/heads/master@{#815667}
8b215cc6