Fix several activity leaks:
1) A listener of sync state changes was not always removed in ChromeActivity. 2) A static variable sCleanupTask in TabPersistensePolicy implementations held a reference to activity and was never nulled after completion/cancellation of the task. 3) ToolbarModel was never destroy()-ed. Note that none of these issues are specific to Custom Tabs. They manifest themselves more severely with Custom Tabs since the CustomTabActivity gets destroyed when the tab is closed, whereas ChromeTabbedActivity is only stopped when the app is minimized. However, with "don't keep activities" turned on, the same leakage is seen when opening and closing Chrome in ordinary way. Bug: 872661 Change-Id: I5802690eb9d7a733426a7ea7ac3fd969c8514810 Reviewed-on: https://chromium-review.googlesource.com/1172425Reviewed-by:Bernhard Bauer <bauerb@chromium.org> Reviewed-by:
Yusuf Ozuysal <yusufo@chromium.org> Commit-Queue: Pavel Shmakov <pshmakov@chromium.org> Cr-Commit-Position: refs/heads/master@{#583998}
Showing
Please register or sign in to comment