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

Unified Diff: Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp

Issue 152883002: (Concept patch) Simplify WTF::HashTable::add() return value for size and performance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
diff --git a/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp b/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
index b7ea628bd484b67024d0328d08ade36df57c6398..c1c0374bf997f2363074c3887dc9f07e157dbe40 100644
--- a/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
+++ b/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
@@ -51,8 +51,9 @@ void CustomElementUpgradeCandidateMap::add(const CustomElementDescriptor& descri
UnresolvedDefinitionMap::iterator it = m_unresolvedDefinitions.find(descriptor);
if (it == m_unresolvedDefinitions.end())
- it = m_unresolvedDefinitions.add(descriptor, ElementSet()).iterator;
- it->value.add(element);
+ m_unresolvedDefinitions.add(descriptor, ElementSet()).iterator->value.add(element);
Inactive 2014/02/04 14:21:33 This sort of change leads to some code duplication
+ else
+ it->value.add(element);
}
void CustomElementUpgradeCandidateMap::remove(Element* element)

Powered by Google App Engine
This is Rietveld 408576698