Skip to content

Commit 69c40d2

Browse files
committed
Fix decodeAudioData algorithm logic
Per WG resolution 2025-05-15: - Step 3 condition now correctly says "is not detached" instead of "is detached" - Step 3.2 now correctly jumps to step 4.1 (error handling) if the ArrayBuffer detach operation throws Also fixed "this operations" -> "this operation" typo. This fixes #2637 and fixes #2646.
1 parent 4b11c58 commit 69c40d2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

index.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,14 +1237,14 @@ Methods</h4>
12371237

12381238
2. Let <var>promise</var> be a new Promise.
12391239

1240-
3. If {{BaseAudioContext/decodeAudioData(audioData, successCallback, errorCallback)/audioData!!argument}}
1241-
is [=BufferSource/detached=], execute the following steps:
1240+
3. If {{BaseAudioContext/decodeAudioData(audioData, successCallback, errorCallback)/audioData!!argument}}
1241+
is not [=BufferSource/detached=], execute the following steps:
12421242

12431243
1. Append <var>promise</var> to {{BaseAudioContext/[[pending promises]]}}.
12441244

12451245
2. [=ArrayBuffer/Detach=]
12461246
the {{BaseAudioContext/decodeAudioData(audioData, successCallback, errorCallback)/audioData!!argument}} {{ArrayBuffer}}.
1247-
If this operations throws, jump to the step 3.
1247+
If this operation throws, jump to step 4.1.
12481248

12491249
3. Queue a decoding operation to be performed on another thread.
12501250

0 commit comments

Comments
 (0)