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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs Created 3 years, 10 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/custom/CustomElementRegistry.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
index 245c52da9a70e30750aa65b123abb30a5331af17..dc3606967ffa3c791176b1adee1ae1d8fca860aa 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
@@ -187,7 +187,7 @@ CustomElementDefinition* CustomElementRegistry::define(
CHECK(!exceptionState.hadException());
CHECK(definition->descriptor() == descriptor);
DefinitionMap::AddResult result =
- m_definitions.add(descriptor.name(), definition);
+ m_definitions.insert(descriptor.name(), definition);
CHECK(result.isNewEntry);
HeapVector<Member<Element>> candidates;
@@ -264,7 +264,7 @@ void CustomElementRegistry::addCandidate(Element* candidate) {
if (it != m_upgradeCandidates->end()) {
set = it->value;
} else {
- set = m_upgradeCandidates->add(name, new UpgradeCandidateSet())
+ set = m_upgradeCandidates->insert(name, new UpgradeCandidateSet())
.storedValue->value;
}
set->insert(candidate);
@@ -285,7 +285,7 @@ ScriptPromise CustomElementRegistry::whenDefined(
return resolver->promise();
ScriptPromiseResolver* newResolver =
ScriptPromiseResolver::create(scriptState);
- m_whenDefinedPromiseMap.add(name, newResolver);
+ m_whenDefinedPromiseMap.insert(name, newResolver);
return newResolver->promise();
}

Powered by Google App Engine
This is Rietveld 408576698