New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 715979 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

BottomSheetObservers are never removed

Project Member Reported by dgn@chromium.org, Apr 27 2017

Issue description

Memory leak?

SuggestionsBottomSheetContent never removes its BottomSheet observer, but since we should not destroy and recreate it it might not be an issue.

However the other BottomSheetContents don't do it either, while they get destroyed every time we close the bottom sheet, and there is no BottomSheet#removeObserver()
 
Owner: mdjones@chromium.org
Status: Assigned (was: Available)
Yeah, good catch. It wasn't originally added because the original users' life cycles were the same as the sheet. There was discussion then on adding it for more complex users but it looks like we missed that window.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/305e5224d9e9b11a609e17ca11866be3a3622ad6

commit 305e5224d9e9b11a609e17ca11866be3a3622ad6
Author: mdjones <mdjones@chromium.org>
Date: Fri Apr 28 17:27:18 2017

[Home] Remove BottomSheetObservers that are no longer used

Previously, all observers of the bottom sheet had a life cycle that
matched the bottom sheet, so it wasn't necessary to remove the. The
suggestions content, however, does have the potential to be destroyed.
This change adds a removeObserver(...) method to the bottom sheet to
handle this case.

BUG= 715979 

Review-Url: https://codereview.chromium.org/2844993003
Cr-Commit-Position: refs/heads/master@{#468043}

[modify] https://crrev.com/305e5224d9e9b11a609e17ca11866be3a3622ad6/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
[modify] https://crrev.com/305e5224d9e9b11a609e17ca11866be3a3622ad6/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java

Status: Fixed (was: Assigned)

Sign in to add a comment