зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1489160 - Check mCloseCalled instead of mAudioContextState when checking for a closed AudioContext. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D98316
This commit is contained in:
Родитель
321d0d9ea2
Коммит
6a217d23a6
|
@ -931,7 +931,7 @@ already_AddRefed<Promise> AudioContext::Suspend(ErrorResult& aRv) {
|
|||
return promise.forget();
|
||||
}
|
||||
|
||||
if (mAudioContextState == AudioContextState::Closed || mCloseCalled) {
|
||||
if (mCloseCalled) {
|
||||
promise->MaybeRejectWithInvalidStateError(
|
||||
"Can't suspend if the control thread state is \"closed\"");
|
||||
return promise.forget();
|
||||
|
@ -1002,7 +1002,7 @@ already_AddRefed<Promise> AudioContext::Resume(ErrorResult& aRv) {
|
|||
return promise.forget();
|
||||
}
|
||||
|
||||
if (mAudioContextState == AudioContextState::Closed || mCloseCalled) {
|
||||
if (mCloseCalled) {
|
||||
promise->MaybeRejectWithInvalidStateError(
|
||||
"Can't resume if the control thread state is \"closed\"");
|
||||
return promise.forget();
|
||||
|
@ -1139,7 +1139,7 @@ already_AddRefed<Promise> AudioContext::Close(ErrorResult& aRv) {
|
|||
return promise.forget();
|
||||
}
|
||||
|
||||
if (mAudioContextState == AudioContextState::Closed) {
|
||||
if (mCloseCalled) {
|
||||
promise->MaybeRejectWithInvalidStateError(
|
||||
"Can't close an AudioContext twice");
|
||||
return promise.forget();
|
||||
|
|
Загрузка…
Ссылка в новой задаче