| Summary: | Avoid heap allocation under AudioNodeInput::disable() / AudioNodeInput::enable() | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||
| Component: | Web Audio | Assignee: | Chris Dumez <cdumez> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | cdumez, darin, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, peng.liu6, philipj, sergio, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=223226 | ||||||||||
| Bug Depends on: | 225174 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Chris Dumez
2021-03-19 11:43:28 PDT
Created attachment 423762 [details]
Patch
Created attachment 423769 [details]
Patch
Comment on attachment 423769 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423769&action=review > Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp:135 > + m_pendingRenderingOutputs->updatedEnabledState(output); Nit. Regarding "m_pendingRenderingOutputs." and "m_pendingRenderingOutputs->", I believe they are working. But they look strange at first glance. :-) > Source/WebCore/Modules/webaudio/AudioSummingJunction.h:69 > + bool operator==(AudioNodeOutput* other) const { return output == other; } const AudioNodeOutput* other? (In reply to Peng Liu from comment #3) > Comment on attachment 423769 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=423769&action=review > > > Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp:135 > > + m_pendingRenderingOutputs->updatedEnabledState(output); > > Nit. Regarding "m_pendingRenderingOutputs." and > "m_pendingRenderingOutputs->", I believe they are working. But they look > strange at first glance. :-) What looks strange? It is an Optional<> now so I need to `->` instead of `.` > > > Source/WebCore/Modules/webaudio/AudioSummingJunction.h:69 > > + bool operator==(AudioNodeOutput* other) const { return output == other; } > > const AudioNodeOutput* other? OK. Comment on attachment 423769 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423769&action=review >>> Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp:135 >>> + m_pendingRenderingOutputs->updatedEnabledState(output); >> >> Nit. Regarding "m_pendingRenderingOutputs." and "m_pendingRenderingOutputs->", I believe they are working. But they look strange at first glance. :-) > > What looks strange? It is an Optional<> now so I need to `->` instead of `.` At first glance I was surprised by the "m_pendingRenderingOutputs." in the "if" branch and "m_pendingRenderingOutputs->" in the "else" branch. But it is not an issue actually. :-) Created attachment 423789 [details]
Patch
commit-queue failed to commit attachment 423789 [details] to WebKit repository. To retry, please set cq+ flag again.
Committed r274767: <https://commits.webkit.org/r274767> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423789 [details]. |