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

Unified Diff: third_party/WebKit/Source/core/dom/MutationObserver.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 11 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/core/dom/MutationObserver.cpp
diff --git a/third_party/WebKit/Source/core/dom/MutationObserver.cpp b/third_party/WebKit/Source/core/dom/MutationObserver.cpp
index a25ae140e7266ba4ba3a290492f4e5142d42008b..8b00d1453f80a749bc13e25cd7d1391a8f29d7f1 100644
--- a/third_party/WebKit/Source/core/dom/MutationObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/MutationObserver.cpp
@@ -77,7 +77,7 @@ void MutationObserver::observe(Node* node,
HashSet<AtomicString> attributeFilter;
if (observerInit.hasAttributeFilter()) {
for (const auto& name : observerInit.attributeFilter())
- attributeFilter.add(AtomicString(name));
+ attributeFilter.insert(AtomicString(name));
options |= AttributeFilter;
}
@@ -157,7 +157,7 @@ void MutationObserver::disconnect() {
void MutationObserver::observationStarted(
MutationObserverRegistration* registration) {
DCHECK(!m_registrations.contains(registration));
- m_registrations.add(registration);
+ m_registrations.insert(registration);
}
void MutationObserver::observationEnded(
@@ -211,7 +211,7 @@ void MutationObserver::cleanSlotChangeList(Document& document) {
static void activateObserver(MutationObserver* observer) {
ensureEnqueueMicrotask();
- activeMutationObservers().add(observer);
+ activeMutationObservers().insert(observer);
}
void MutationObserver::enqueueMutationRecord(MutationRecord* mutation) {
@@ -303,7 +303,7 @@ void MutationObserver::deliverMutations() {
std::sort(observers.begin(), observers.end(), ObserverLessThan());
for (const auto& observer : observers) {
if (observer->shouldBeSuspended())
- suspendedMutationObservers().add(observer);
+ suspendedMutationObservers().insert(observer);
else
observer->deliver();
}

Powered by Google App Engine
This is Rietveld 408576698