[webkit-reviews] review granted: [Bug 223230] Avoid heap allocation under AudioSummingJunction::updateRenderingState() : [Attachment 423280] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 16 14:24:12 PDT 2021


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 223230: Avoid heap allocation under
AudioSummingJunction::updateRenderingState()
https://bugs.webkit.org/show_bug.cgi?id=223230

Attachment 423280: Patch

https://bugs.webkit.org/attachment.cgi?id=423280&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 423280
  --> https://bugs.webkit.org/attachment.cgi?id=423280
Patch

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

> Source/WebCore/Modules/webaudio/AudioSummingJunction.h:87
> +    Optional<Vector<AudioNodeOutput*>> m_pendingRenderingOutputs;

I don’t see why we have to use Optional here. If we used an empty vector
instead, and replaced the checks for null with checks for an empty vector, I
think all the code above would still be correct. We could then remove the
special case for null/empty from updateRenderingState.


More information about the webkit-reviews mailing list