Revert "Fix some tab lifetime management issues in TabLifecycleUnitSource."
This reverts commit 70546dc6. Reason for revert: Causing flaky crashes on waterfall, see https://crbug.com/820075. Original change's description: > Fix some tab lifetime management issues in TabLifecycleUnitSource. > > Move the WebContentsObserver from TabLifeCycleUnit to TabLifeCycleUnitSource, > this allows for a better tracking of the WebContents lifetime, in some > situation a WebContents might get detached from the TabStrip and then > destroyed, which mean that we won't get a TabClosingAt notification for > this tab destruction. > > Another solution would be to implement the TabStripModelObserver::TabDetachedAt > function and track the tabs which are in a detached state but this is slightly > more complex because TabDetachedAt might be called for several reasons: > - A TabDetachedAt usually come after a TabClosedAt event. > - TabDetachedAt might be followed by TabInsertedAt, or not if it get destroyed. > because of this we won't know if we should keep the TabLifeCycleUnit for this > WebContents around (i.e. if it'll get re-inserted in a tab strip) or destroy > it because it's being destroyed. > > Observing WebContentsObserver::WebContentsDestroyed and moving the logic that > was in TabClosingAt to this method address these issues, it's the same approach > than the one we took in TabStatsTracker. > > Bug: 819352, 818454 > Change-Id: Ibd3fe49b2798ade19ee781cb70eb30e52372d686 > Reviewed-on: https://chromium-review.googlesource.com/952405 > Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org> > Reviewed-by: Chris Hamilton <chrisha@chromium.org> > Cr-Commit-Position: refs/heads/master@{#541540} TBR=chrisha@chromium.org,sebmarchand@chromium.org Change-Id: I0aa17b4db9f4c1468e190ef4ec0dc86aeb08c3a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 819352, 818454 Reviewed-on: https://chromium-review.googlesource.com/955882Reviewed-by:kylechar <kylechar@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#541802}
Showing
Please register or sign in to comment