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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 23190045: Switch ObserverList::size() to ObserverList::might_have_observers() Pt.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge Created 7 years, 4 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 | « chromeos/dbus/shill_manager_client_stub.cc ('k') | content/browser/media/webrtc_internals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index d4f6e534432ab08c44ba4559dc2d4dade8779584..2a4ad9ac684eaf013e8717688027dc894c13aa1b 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1813,7 +1813,7 @@ void ResourceDispatcherHostImpl::UnregisterResourceMessageDelegate(
DelegateMap::iterator it = delegate_map_.find(id);
DCHECK(it->second->HasObserver(delegate));
it->second->RemoveObserver(delegate);
- if (it->second->size() == 0) {
+ if (!it->second->might_have_observers()) {
delete it->second;
delegate_map_.erase(it);
}
« no previous file with comments | « chromeos/dbus/shill_manager_client_stub.cc ('k') | content/browser/media/webrtc_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698