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

Unified Diff: Source/core/dom/custom/CustomElementScheduler.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/CustomElementScheduler.cpp
diff --git a/Source/core/dom/custom/CustomElementScheduler.cpp b/Source/core/dom/custom/CustomElementScheduler.cpp
index a04b91eb3c602329689238076cfb887e869330a8..d787c60c35dc79c8ab9dd019c516a2b7f1ee4b52 100644
--- a/Source/core/dom/custom/CustomElementScheduler.cpp
+++ b/Source/core/dom/custom/CustomElementScheduler.cpp
@@ -109,7 +109,7 @@ CustomElementCallbackQueue* CustomElementScheduler::ensureCallbackQueue(PassRefP
Element* key = element.get();
ElementCallbackQueueMap::iterator it = m_elementCallbackQueueMap.find(key);
Erik Corry 2014/02/04 14:27:15 Also here with the find that insists on returning
if (it == m_elementCallbackQueueMap.end())
- it = m_elementCallbackQueueMap.add(key, CustomElementCallbackQueue::create(element)).iterator;
+ return m_elementCallbackQueueMap.add(key, CustomElementCallbackQueue::create(element)).iterator->value.get();
return it->value.get();
}

Powered by Google App Engine
This is Rietveld 408576698