Bug 215624

Summary: ScriptProcessNode should only run script asynchronously if the audio context is not an OfflineAudioContext
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: clark_wang, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 212611    
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2020-08-18 13:50:14 PDT
ScriptProcessNode should only run script asynchronously if the audio context is not an OfflineAudioContext. If the context is an OfflineAudioContext, then it should pause processing until the script has finished execution. This aligns our behavior with Blink and helps us pass more WPT tests.
Comment 1 Chris Dumez 2020-08-18 14:09:07 PDT
Created attachment 406808 [details]
Patch
Comment 2 Eric Carlson 2020-08-18 14:30:52 PDT
Comment on attachment 406808 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=406808&action=review

> Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp:214
> +                    // De-reference to match the ref() call in process().

Nit: it is a little odd to have this comment only on the second `deref()`
Comment 3 Chris Dumez 2020-08-18 14:56:21 PDT
Created attachment 406816 [details]
Patch
Comment 4 EWS 2020-08-18 15:51:23 PDT
Committed r265836: <https://trac.webkit.org/changeset/265836>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406816 [details].
Comment 5 Radar WebKit Bug Importer 2020-08-18 15:52:16 PDT
<rdar://problem/67358588>