weblayer: avoid calling WebContents::Stop() at certain points
Calling WebContents::Stop() from WebContentsObserver::DidStartNavigation() or WebContentsObserver::DidRedirectNavigation triggers a crash. This patch works around this by installing a NavigationThrottle. The NavigationThrottle cancels the navigation as necessary. Does this ensures we don't attempt to call Stop() while servicing these functions, yet ends up with the same result. BUG=1068115 TEST=Covered by weblayer_browsertests Change-Id: I284842120c2466a2a74856c0f72201200137b9af Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2141232 Commit-Queue: Scott Violet <sky@chromium.org> Reviewed-by:John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#758214}
Showing
Please register or sign in to comment