Stop observing after destroying RenderWidgetHost.
This is about release blocker: https://crbug.com/1153966 We think the bug is about iterating over an observer that has already been deleted. After: https://chromium-review.googlesource.com/c/chromium/src/+/2594772 all the observers are using ScopedObserver / base::ScopedObservation. This ensures they aren't deleted before unregistering themself. There are 5 RenderWidgetHostObserver: 1) FileSelectHelper 2) SessionRestoreStatsCollector 3) RenderWidgetHostVisibilityTracker 4) HungPagesTableModel 5) PageHandler. Bug happens when deleting an unresponsive tab. Maybe HungPagesTableModel is the culprit here? This patch makes every observer to stop observing as soon as the observee sends RenderWidgetHostDestroyed(). This also clears any references toward the RenderWidgetHost. I don't really have high hopes this will fix the bug. However this doesn't hurt to be more cautious. Bug: 1153966 Change-Id: I210e414e281665f56b148ac4248770448c55a0be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595443 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#838273}
Showing
Please register or sign in to comment