зеркало из https://github.com/mozilla/gecko-dev.git
Bug 830648 - AudioChannelAgent::StartPlaying() should check if already registered to AudioChannelService., r=mchen
This commit is contained in:
Родитель
2ebebe85a4
Коммит
95d3343452
|
@ -20,6 +20,9 @@ AudioChannelAgent::AudioChannelAgent()
|
|||
|
||||
AudioChannelAgent::~AudioChannelAgent()
|
||||
{
|
||||
if (mIsRegToService) {
|
||||
StopPlaying();
|
||||
}
|
||||
}
|
||||
|
||||
/* readonly attribute long audioChannelType; */
|
||||
|
@ -66,7 +69,7 @@ NS_IMETHODIMP AudioChannelAgent::StartPlaying(bool *_retval)
|
|||
{
|
||||
AudioChannelService *service = AudioChannelService::GetAudioChannelService();
|
||||
if (mAudioChannelType == AUDIO_AGENT_CHANNEL_ERROR ||
|
||||
service == nullptr) {
|
||||
service == nullptr || mIsRegToService) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -81,7 +84,7 @@ NS_IMETHODIMP AudioChannelAgent::StartPlaying(bool *_retval)
|
|||
NS_IMETHODIMP AudioChannelAgent::StopPlaying(void)
|
||||
{
|
||||
if (mAudioChannelType == AUDIO_AGENT_CHANNEL_ERROR ||
|
||||
mIsRegToService == false) {
|
||||
!mIsRegToService) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче