[reland] weblayer: allow calling Navigate() from onNavigationStarted
At the time OnNavigationStarted() is called it's not safe to call Navigate(). This patch delays the navigate until it is safe (when NavigationThrottleImpl::WillStartRequest() is called). This is a reland because of a use-after-free. In particular, when NavigationThrottle calls out to DoNavigate, navigationThrottle may be deleted. The code was not set up to handle that. BUG=1070569 TEST=NavigationBrowserTest.NavigateFromRendererInitiatedNavigation Change-Id: I769ef0e0143d333e2fddbd997be2dc9de7aba3bb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154592Reviewed-by:John Abd-El-Malek <jam@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#760102}
Showing
Please register or sign in to comment