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

Unified Diff: Source/core/input/EventHandler.cpp

Issue 1198193005: Fixed memory issues with EventHandler::TouchInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« Source/core/input/EventHandler.h ('K') | « Source/core/input/EventHandler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/input/EventHandler.cpp
diff --git a/Source/core/input/EventHandler.cpp b/Source/core/input/EventHandler.cpp
index ed72ddf7134747ec0f7302532c2da5e16c164a68..c6e766f67b2423d758b3de1f7158c61c78d94c31 100644
--- a/Source/core/input/EventHandler.cpp
+++ b/Source/core/input/EventHandler.cpp
@@ -3540,7 +3540,7 @@ bool EventHandler::dispatchTouchEvents(const PlatformTouchEvent& event,
RefPtrWillBeRawPtr<Touch> touch = Touch::create(
touchInfo.targetFrame,
- touchInfo.touchTarget,
+ touchInfo.touchTarget.get(),
point.id(),
point.screenPos(),
touchInfo.adjustedPagePoint,
@@ -3550,10 +3550,10 @@ bool EventHandler::dispatchTouchEvents(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.
- TargetTouchesHeapMap::iterator targetTouchesIterator = touchesByTarget.find(touchInfo.touchTarget);
+ TargetTouchesHeapMap::iterator targetTouchesIterator = touchesByTarget.find(touchInfo.touchTarget.get());
if (targetTouchesIterator == touchesByTarget.end()) {
- touchesByTarget.set(touchInfo.touchTarget, TouchList::create());
- targetTouchesIterator = touchesByTarget.find(touchInfo.touchTarget);
+ touchesByTarget.set(touchInfo.touchTarget.get(), TouchList::create());
+ targetTouchesIterator = touchesByTarget.find(touchInfo.touchTarget.get());
}
// touches and targetTouches should only contain information about
@@ -3766,7 +3766,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
TouchInfo& touchInfo = touchInfos[i];
touchInfo.point = point;
- touchInfo.touchTarget = touchTarget.get();
+ touchInfo.touchTarget = touchTarget;
touchInfo.targetFrame = targetFrame;
touchInfo.adjustedPagePoint = pagePoint.scaledBy(scaleFactor);
touchInfo.adjustedRadius = point.radius().scaledBy(scaleFactor);
« Source/core/input/EventHandler.h ('K') | « Source/core/input/EventHandler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698