Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2925)

Unified Diff: base/android/java/src/org/chromium/base/ObserverList.java

Issue 179793007: Always use the observer's index in ObserverList.removeObserver(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observerlist_returns_boolean
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/ObserverList.java
diff --git a/base/android/java/src/org/chromium/base/ObserverList.java b/base/android/java/src/org/chromium/base/ObserverList.java
index d10dc6a0ce1d0fa0e859bc47632b435a22cfa533..87e5e644e11bf8f8e82d93051b18ef92191810b1 100644
--- a/base/android/java/src/org/chromium/base/ObserverList.java
+++ b/base/android/java/src/org/chromium/base/ObserverList.java
@@ -80,7 +80,7 @@ public class ObserverList<E> implements Iterable<E> {
if (mIterationDepth == 0) {
// No one is iterating over the list.
- mObservers.remove(obs);
+ mObservers.remove(index);
} else {
mObservers.set(index, null);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698