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

Unified Diff: Source/core/inspector/TraceEventDispatcher.cpp

Issue 167123002: Simpler return value from HashTable::add()/HashMap::add() and others (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/TraceEventDispatcher.cpp
diff --git a/Source/core/inspector/TraceEventDispatcher.cpp b/Source/core/inspector/TraceEventDispatcher.cpp
index bdfbea6fe58dff18b19af8ffc4a6468386c99c35..a75f4a44cfd9bcdae27a0a6d3dd00b61541f2cfc 100644
--- a/Source/core/inspector/TraceEventDispatcher.cpp
+++ b/Source/core/inspector/TraceEventDispatcher.cpp
@@ -106,8 +106,9 @@ void TraceEventDispatcher::innerAddListener(const char* name, char phase, TraceE
client->setTraceEventCallback(dispatchEventOnAnyThread);
HandlersMap::iterator it = m_handlers.find(std::make_pair(name, phase));
if (it == m_handlers.end())
- it = m_handlers.add(std::make_pair(name, phase), Vector<BoundTraceEventHandler>()).iterator;
- it->value.append(BoundTraceEventHandler(instance, method));
+ m_handlers.add(std::make_pair(name, phase), Vector<BoundTraceEventHandler>()).storedValue->value.append(BoundTraceEventHandler(instance, method));
+ else
+ it->value.append(BoundTraceEventHandler(instance, method));
}
void TraceEventDispatcher::removeAllListeners(TraceEventTargetBase* instance, InspectorClient* client)
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698