Bug 1101628 - Follow-up to fix crash in some gtest scenarios. r=me
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 01 Jun 2016 17:17:06 -0400
changeset 374172 f9f96ca7f0432a51b7ef3932c7fb8711a4362f35
parent 374171 81bfec47b65d25b4c2303f345d174e475d45e380
child 374173 9d903a6a12aa7182252ec3e220c89b569c14e11b
push id19947
push userbmo:mh+mozilla@glandium.org
push dateWed, 01 Jun 2016 23:56:41 +0000
reviewersme
bugs1101628
milestone49.0a1
Bug 1101628 - Follow-up to fix crash in some gtest scenarios. r=me MozReview-Commit-ID: 9qRNiaMnLd
gfx/layers/apz/src/APZCTreeManager.cpp
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -1013,21 +1013,25 @@ APZCTreeManager::ProcessTouchInput(Multi
     }
   }
 
   nsEventStatus result = nsEventStatus_eIgnore;
   if (mApzcForInputBlock) {
     MOZ_ASSERT(mHitResultForInputBlock != HitNothing);
 
     mApzcForInputBlock->GetGuid(aOutTargetGuid);
+    uint64_t inputBlockId = 0;
     result = mInputQueue->ReceiveInputEvent(mApzcForInputBlock,
         /* aTargetConfirmed = */ mHitResultForInputBlock != HitDispatchToContentRegion,
-        aInput, aOutInputBlockId);
+        aInput, &inputBlockId);
+    if (aOutInputBlockId) {
+      *aOutInputBlockId = inputBlockId;
+    }
     if (!touchBehaviors.IsEmpty()) {
-      mInputQueue->SetAllowedTouchBehavior(*aOutInputBlockId, touchBehaviors);
+      mInputQueue->SetAllowedTouchBehavior(inputBlockId, touchBehaviors);
     }
 
     // For computing the event to pass back to Gecko, use up-to-date transforms
     // (i.e. not anything cached in an input block).
     // This ensures that transformToApzc and transformToGecko are in sync.
     ScreenToParentLayerMatrix4x4 transformToApzc = GetScreenToApzcTransform(mApzcForInputBlock);
     ParentLayerToScreenMatrix4x4 transformToGecko = GetApzcToGeckoTransform(mApzcForInputBlock);
     ScreenToScreenMatrix4x4 outTransform = transformToApzc * transformToGecko;