Skip to content

Commit b487188

Browse files
author
Cosm
committed
Bug 1385335 - Use RecursiveMutex in AsyncPanZoomController.r=botond
MozReview-Commit-ID: ETzQVCu1o7z --HG-- extra : rebase_source : c7126c098f63e8ce12506dfaee0d995091512b06
1 parent 65903a9 commit b487188

File tree

7 files changed

+98
-90
lines changed

7 files changed

+98
-90
lines changed

gfx/layers/apz/src/APZCTreeManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class WebRenderScrollData;
5454
* ****************** NOTE ON LOCK ORDERING IN APZ **************************
5555
*
5656
* There are two kinds of locks used by APZ: APZCTreeManager::mTreeLock
57-
* ("the tree lock") and AsyncPanZoomController::mMonitor ("APZC locks").
57+
* ("the tree lock") and AsyncPanZoomController::mRecursiveMutex ("APZC locks").
5858
*
5959
* To avoid deadlock, we impose a lock ordering between these locks, which is:
6060
*

gfx/layers/apz/src/AndroidAPZ.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ AndroidFlingAnimation::AndroidFlingAnimation(AsyncPanZoomController& aApzc,
9090
// This ensures that we don't take the 'overscroll' path in Sample()
9191
// on account of one axis which can't scroll having a velocity.
9292
if (!mOverscrollHandoffChain->CanScrollInDirection(&mApzc, ScrollDirection::HORIZONTAL)) {
93-
ReentrantMonitorAutoEnter lock(mApzc.mMonitor);
93+
RecursiveMutexAutoLock lock(mApzc.mRecursiveMutex);
9494
mApzc.mX.SetVelocity(0);
9595
}
9696
if (!mOverscrollHandoffChain->CanScrollInDirection(&mApzc, ScrollDirection::VERTICAL)) {
97-
ReentrantMonitorAutoEnter lock(mApzc.mMonitor);
97+
RecursiveMutexAutoLock lock(mApzc.mRecursiveMutex);
9898
mApzc.mY.SetVelocity(0);
9999
}
100100

0 commit comments

Comments
 (0)