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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/Resource.cpp

Issue 2799573003: Migrate WTF::HashCountedSet::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
index 1f11621b4146b6aba108405ad21c99439a4d4aee..f0f5e3b0c0885a16328ac4b98472805300c6ee5e 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
@@ -371,7 +371,7 @@ void Resource::checkNotify() {
void Resource::markClientFinished(ResourceClient* client) {
if (m_clients.contains(client)) {
m_finishedClients.insert(client);
- m_clients.remove(client);
+ m_clients.erase(client);
}
}
@@ -660,7 +660,7 @@ void Resource::didAddClient(ResourceClient* c) {
c->notifyFinished(this);
if (m_clients.contains(c)) {
m_finishedClients.insert(c);
- m_clients.remove(c);
+ m_clients.erase(c);
}
}
}
@@ -737,11 +737,11 @@ void Resource::removeClient(ResourceClient* client) {
// HashCountedSet are already swept out.
if (m_finishedClients.contains(client))
- m_finishedClients.remove(client);
+ m_finishedClients.erase(client);
else if (m_clientsAwaitingCallback.contains(client))
- m_clientsAwaitingCallback.remove(client);
+ m_clientsAwaitingCallback.erase(client);
else
- m_clients.remove(client);
+ m_clients.erase(client);
if (m_clientsAwaitingCallback.isEmpty())
ResourceCallback::callbackHandler().cancel(this);
@@ -812,7 +812,7 @@ void Resource::finishPendingClients() {
for (const auto& client : clientsToNotify) {
// Handle case (2) to skip removed clients.
- if (!m_clientsAwaitingCallback.remove(client))
+ if (!m_clientsAwaitingCallback.erase(client))
continue;
m_clients.insert(client);
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/platform/wtf/HashCountedSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698