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

Unified Diff: Source/core/page/EventHandler.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/TraceEventDispatcher.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 1a1b6d5f8102b02fcd7fdb6584124f711878e974..cf16660a6b045b4a2b1d4b08e4effbe9b3232974 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -3715,8 +3715,10 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
// Ensure this target's touch list exists, even if it ends up empty, so it can always be passed to TouchEvent::Create below.
TargetTouchesMap::iterator targetTouchesIterator = touchesByTarget.find(touchTarget.get());
- if (targetTouchesIterator == touchesByTarget.end())
- targetTouchesIterator = touchesByTarget.set(touchTarget.get(), TouchList::create()).iterator;
+ if (targetTouchesIterator == touchesByTarget.end()) {
+ touchesByTarget.set(touchTarget.get(), TouchList::create());
+ targetTouchesIterator = touchesByTarget.find(touchTarget.get());
+ }
// touches and targetTouches should only contain information about touches still on the screen, so if this point is
// released or cancelled it will only appear in the changedTouches list.
« no previous file with comments | « Source/core/inspector/TraceEventDispatcher.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698