Bug 1524193 - Make audio wakelocks put background tabs into the normal priority bucket. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D19502

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2019-02-12 15:24:29 +00:00
parent bed715bf41
commit c041cfdaef

View File

@ -749,12 +749,13 @@ ProcessPriority ParticularProcessPriorityManager::CurrentPriority() {
ProcessPriority ParticularProcessPriorityManager::ComputePriority() {
if (!mActiveTabParents.IsEmpty() ||
mContentParent->GetRemoteType().EqualsLiteral(EXTENSION_REMOTE_TYPE)) {
mContentParent->GetRemoteType().EqualsLiteral(EXTENSION_REMOTE_TYPE) ||
mHoldsPlayingAudioWakeLock) {
return PROCESS_PRIORITY_FOREGROUND;
}
if (mHoldsCPUWakeLock || mHoldsHighPriorityWakeLock ||
mHoldsPlayingAudioWakeLock || mHoldsPlayingVideoWakeLock) {
mHoldsPlayingVideoWakeLock) {
return PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE;
}