| Summary: | Updated AudioContext constructor according to spec | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Clark Wang <clark_wang> | ||||||
| Component: | Web Audio | Assignee: | Clark Wang <clark_wang> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | annulen, cdumez, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, kondapallykalyan, philipj, ryuan.choi, sergio, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 212611 | ||||||||
| Attachments: |
|
||||||||
|
Description
Clark Wang
2020-07-13 12:50:25 PDT
Created attachment 404168 [details]
Patch
Comment on attachment 404168 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404168&action=review > Source/WebCore/Modules/webaudio/AudioContext.cpp:68 > + Optional<float> sampleRate = contextOptions.sampleRate; This local variable is not needed. > Source/WebCore/Modules/webaudio/AudioContext.cpp:78 > +AudioContext::AudioContext(Document& document, Optional<float> sampleRate) I suggest passing the whole AudioContextOptions struct here. > Source/WebCore/Modules/webaudio/BaseAudioContext.h:287 > explicit BaseAudioContext(Document&); I suggest passing the whole AudioContextOptions struct here (with a default value): explicit BaseAudioContext(Document&, const AudioContextOptions& = { }); > Source/WebCore/Modules/webaudio/BaseAudioContext.h:289 > + BaseAudioContext(Document&, Optional<float>); Let's not add yet another constructor. > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.h:49 > explicit DefaultAudioDestinationNode(BaseAudioContext&); explicit DefaultAudioDestinationNode(BaseAudioContext&, Optional<float> = WTF::nullopt); > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.h:50 > + DefaultAudioDestinationNode(BaseAudioContext&, Optional<float>); Let's not add another constructor. > LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:3 > +FAIL Executing "test" promise_test: Unhandled rejection with value: object "SyntaxError: sampleRate is not in range" Why are we failing this? Created attachment 404191 [details]
Patch
Committed r264342: <https://trac.webkit.org/changeset/264342> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404191 [details]. |