зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1338137 - part2 : remove function IsServiceStarted(). r=baku
The reason we introduced the IsServiceStarted(), check bug1338466 comment5 for more details. The patch1 introduces more robust way to check the alive media component, so we can remove IsServiceStarted(). MozReview-Commit-ID: LIma8hZTuhA --HG-- extra : rebase_source : 4687ef41cc765f4ffeb97aeac63b727897456167
This commit is contained in:
Родитель
77053f1035
Коммит
20af818a6f
|
@ -203,13 +203,6 @@ AudioChannelService::CreateServiceIfNeeded()
|
|||
}
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
AudioChannelService::IsServiceStarted()
|
||||
{
|
||||
// The service would start when the first AudioChannelAgent is created.
|
||||
return !!gAudioChannelService;
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<AudioChannelService>
|
||||
AudioChannelService::GetOrCreate()
|
||||
{
|
||||
|
|
|
@ -106,8 +106,6 @@ public:
|
|||
|
||||
static bool IsEnableAudioCompeting();
|
||||
|
||||
static bool IsServiceStarted();
|
||||
|
||||
/**
|
||||
* Any audio channel agent that starts playing should register itself to
|
||||
* this service, sharing the AudioChannel.
|
||||
|
|
|
@ -4241,8 +4241,7 @@ nsPIDOMWindowOuter::MaybeActiveMediaComponents()
|
|||
}
|
||||
|
||||
if (!doc->Hidden() &&
|
||||
mMediaSuspend == nsISuspendedTypes::SUSPENDED_BLOCK &&
|
||||
AudioChannelService::IsServiceStarted()) {
|
||||
mMediaSuspend == nsISuspendedTypes::SUSPENDED_BLOCK) {
|
||||
SetMediaSuspend(nsISuspendedTypes::NONE_SUSPENDED);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче