зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1412189 - Avoid main-thread access in PrioritizedEventQueue::SelectQueue (r=stone)
MozReview-Commit-ID: GY43FXgqr2h
This commit is contained in:
Родитель
b2b66a61f5
Коммит
38f2553236
|
@ -124,8 +124,10 @@ PrioritizedEventQueue<InnerQueueT>::SelectQueue(bool aUpdateState,
|
|||
bool normalPending = !mNormalQueue->IsEmpty(aProofOfLock);
|
||||
size_t inputCount = mInputQueue->Count(aProofOfLock);
|
||||
|
||||
if (mInputQueueState == STATE_ENABLED &&
|
||||
mInputHandlingStartTime.IsNull() && inputCount > 0) {
|
||||
if (aUpdateState &&
|
||||
mInputQueueState == STATE_ENABLED &&
|
||||
mInputHandlingStartTime.IsNull() &&
|
||||
inputCount > 0) {
|
||||
mInputHandlingStartTime =
|
||||
InputEventStatistics::Get()
|
||||
.GetInputHandlingStartTime(inputCount);
|
||||
|
@ -156,6 +158,7 @@ PrioritizedEventQueue<InnerQueueT>::SelectQueue(bool aUpdateState,
|
|||
queue = EventPriority::High;
|
||||
} else if (inputCount > 0 && (mInputQueueState == STATE_FLUSHING ||
|
||||
(mInputQueueState == STATE_ENABLED &&
|
||||
!mInputHandlingStartTime.IsNull() &&
|
||||
TimeStamp::Now() > mInputHandlingStartTime))) {
|
||||
queue = EventPriority::Input;
|
||||
} else if (normalPending) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче