| Summary: | Extend WebAudio heap allocation assertions to cover the pre & post-rendering phases | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||||||
| Component: | Web Audio | Assignee: | Chris Dumez <cdumez> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, darin, eric.carlson, ews-watchlist, ggaren, glenn, hta, jer.noble, peng.liu6, philipj, sam, sergio, tommyw, webkit-bug-importer | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| Bug Depends on: | 223226 | ||||||||||||||||
| Bug Blocks: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Chris Dumez
2021-03-23 09:19:44 PDT
Created attachment 424024 [details]
Patch
Created attachment 424051 [details]
Patch
Created attachment 424069 [details]
Patch
Comment on attachment 424069 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424069&action=review > Source/WebCore/Modules/webaudio/AudioDestinationNode.cpp:60 > + ForbidMallocUseForCurrentThreadScope forbidMallocUse; I think giving a comment for these kind of things would be useful, as to someone unfamiliar with this code / audio thread needs, it is a bit of mystery why malloc would be forbidden, or explain the reason a bit in the variable name. > Source/WebCore/Modules/webaudio/AudioNodeInput.cpp:106 > + DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; Same as above, add a comment or improve the variable name, with why we are allowing malloc here? > Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp:71 > + DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; Same as above, add a comment or improve the variable name, with why we are allowing malloc here? > Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp:191 > + DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; Same as above, add a comment or improve the variable name, with why we are allowing malloc here? > Source/WebCore/Modules/webaudio/BaseAudioContext.cpp:874 > + // FIXME: This may cause heap allocations on the audio thread. > + DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; This FIXME is a bit misleading. DisableMallocRestrictionsForCurrentThreadScope won't *cause* the allocations, it only allows them. Adding an explanation as to why they are being allowed would be useful though. (Same for all the other ones). Created attachment 424082 [details]
Patch
Created attachment 424135 [details]
Patch
Created attachment 424166 [details]
Patch
Committed r274989: <https://commits.webkit.org/r274989> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424166 [details]. |