diff --git a/index.bs b/index.bs index 03538147f..7596828bb 100644 --- a/index.bs +++ b/index.bs @@ -1105,9 +1105,11 @@ Methods called, the following steps MUST be performed on the control thread: - 1. Let promise be a new Promise. + 1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}. + + 2. Let promise be a new Promise. - 2. If the operation IsDetachedBuffer + 3. If the operation IsDetachedBuffer (described in [[!ECMASCRIPT]]) on {{BaseAudioContext/decodeAudioData(audioData, successCallback, errorCallback)/audioData!!argument}} is false, execute the following steps: @@ -1121,14 +1123,14 @@ Methods 3. Queue a decoding operation to be performed on another thread. - 3. Else, execute the following error steps: + 4. Else, execute the following error steps: 1. Let error be a {{DataCloneError}}. 2. Reject promise with error, and remove it from {{BaseAudioContext/[[pending promises]]}}. 3. Queue a task to invoke {{BaseAudioContext/decodeAudioData()/errorCallback!!argument}} with error. - 4. Return promise. + 5. Return promise.
@@ -1493,6 +1495,8 @@ Methods
When close is called, execute these steps: + 1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}. + 1. Let promise be a new Promise. 1. If the control thread state flag on the @@ -1676,6 +1680,8 @@ Methods When resume is called, execute these steps: + 1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}. + 1. Let promise be a new Promise. 2. If the control thread state on the @@ -1761,6 +1767,8 @@ Methods
When suspend is called, execute these steps: + 1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}. + 1. Let promise be a new Promise. 2. If the control thread state on the @@ -2025,6 +2033,8 @@ Methods thread:
    +
  1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}. +
  2. If the {{[[rendering started]]}} slot on the {{OfflineAudioContext}} is true, return a rejected promise with {{InvalidStateError}}, and abort these @@ -2107,6 +2117,10 @@ Methods When resume is called, execute these steps: + 1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is + not [=fully active=] then return [=a promise rejected with=] + "{{InvalidStateError}}" {{DOMException}}. + 1. Let promise be a new Promise. 1. Abort these steps and reject promise with