diff options
-rw-r--r-- | chromium/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc b/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc index 920b9cae8e4..b62c44c240a 100644 --- a/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc +++ b/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc @@ -322,8 +322,9 @@ ScriptPromise OfflineAudioContext::resumeContext(ScriptState* script_state) { return promise; } - // If the context is in a closed state, reject the promise. - if (ContextState() == AudioContextState::kClosed) { + // If the context is in a closed state or it really is closed (cleared), + // reject the promise. + if (IsContextClosed()) { resolver->Reject(MakeGarbageCollected<DOMException>( DOMExceptionCode::kInvalidStateError, "cannot resume a closed offline context")); |