[iOS] Fix open new tab nil BrowserState crash.
When closing the last incognito tab, the incognito TabGridMediator's TabModel is reset to nil as the incognito BrowserState is being destroyed. This can occur by tapping the close button and new tab button at the same time, or simply by tapping the new tab button when a tab is closed by JavaScript. Simultaneous button tapping was disabled by crrev.com/c/1150634. This CL adds an extra safeguard to prevent the creation of WebStates with a nil BrowserState. Bug: 838961 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: Iae669290bb9d8079861d488e46cd59495dc809fb Reviewed-on: https://chromium-review.googlesource.com/1152454Reviewed-by:Kurt Horimoto <kkhorimoto@chromium.org> Reviewed-by:
Mark Cogan <marq@chromium.org> Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#579102}
Showing
Please register or sign in to comment