[webkit-reviews] review requested: [Bug 195436] WebRTC: don't use stack buffer : [Attachment 363960] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 7 17:05:28 PST 2019


JF Bastien <jfbastien at apple.com> has asked  for review:
Bug 195436: WebRTC: don't use stack buffer
https://bugs.webkit.org/show_bug.cgi?id=195436

Attachment 363960: Patch

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




--- Comment #12 from JF Bastien <jfbastien at apple.com> ---
Created attachment 363960

  --> https://bugs.webkit.org/attachment.cgi?id=363960&action=review

Patch

(In reply to youenn fablet from comment #11)
> Comment on attachment 363958 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=363958&action=review
> 
> > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:99
> > +	     m_data.reset(std::make_unique<char[]>(bytesPerSample * channels *
samplesPerFrame));
> 
> Would use m_data = std::make_unique.

Oops yes. Fixed.


> If we go down that road, we could also allocate m_data in
> StartPlayoutOnAudioThread and delete it when exiting of
> StartPlayoutOnAudioThread.
> That would remove the if check and deallocate it when no longer needed.

I can do that if you want, I didn't dig through the code to convince myself
that it was correct :-)


More information about the webkit-reviews mailing list