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

Unified Diff: base/observer_list.h

Issue 15836004: Update base/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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 | « base/bind_internal.h.pump ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/observer_list.h
diff --git a/base/observer_list.h b/base/observer_list.h
index 364b180118ffbec8fc57566406734cc6ece24030..20f183d9cc543821ef4e393b0f813d3782059834 100644
--- a/base/observer_list.h
+++ b/base/observer_list.h
@@ -89,12 +89,12 @@ class ObserverListBase
}
~Iterator() {
- if (list_ && --list_->notify_depth_ == 0)
+ if (list_.get() && --list_->notify_depth_ == 0)
list_->Compact();
}
ObserverType* GetNext() {
- if (!list_)
+ if (!list_.get())
return NULL;
ListType& observers = list_->observers_;
// Advance if the current element is null
« no previous file with comments | « base/bind_internal.h.pump ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698