Bug 1077402 - Lock monitor when accessing overscrolling transform. r=kats a=bajaj
authorAndrew Osmond <aosmond@mozilla.com>
Fri, 03 Oct 2014 06:38:00 +0200
changeset 223091 34dd5b90c0d91b01af28f22e358d612b58e28a71
parent 223090 4596fc5abb411bdef98f1a99aa98adfa14dc95f4
child 223092 3e14894f2252e11cf49dbf3b8b0e77723d9c264a
push id4
push usergszorc@mozilla.com
push dateWed, 29 Oct 2014 02:48:29 +0000
reviewerskats, bajaj
bugs1077402
milestone34.0a2
Bug 1077402 - Lock monitor when accessing overscrolling transform. r=kats a=bajaj
gfx/layers/apz/src/AsyncPanZoomController.cpp
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -2196,16 +2196,17 @@ bool AsyncPanZoomController::UpdateAnima
     }
     UpdateSharedCompositorFrameMetrics();
     return true;
   }
   return false;
 }
 
 Matrix4x4 AsyncPanZoomController::GetOverscrollTransform() const {
+  ReentrantMonitorAutoEnter lock(mMonitor);
   if (!IsOverscrolled()) {
     return Matrix4x4();
   }
 
   // The overscroll effect is a uniform stretch along the overscrolled axis,
   // with the edge of the content where we have reached the end of the
   // scrollable area pinned into place.