[webkit-reviews] review granted: [Bug 178003] [MSE] Move SourceBuffer's pending append data into the platform implementations : [Attachment 323000] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 6 08:48:36 PDT 2017


Jer Noble <jer.noble at apple.com> has granted Zan Dobersek <zan at falconsigh.net>'s
request for review:
Bug 178003: [MSE] Move SourceBuffer's pending append data into the platform
implementations
https://bugs.webkit.org/show_bug.cgi?id=178003

Attachment 323000: Patch

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




--- Comment #5 from Jer Noble <jer.noble at apple.com> ---
Comment on attachment 323000
  --> https://bugs.webkit.org/attachment.cgi?id=323000
Patch

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

r=me, with nit.

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:564
> +    // Ensure the m_pendingAppendData object is moved from, in case the
platform implementation
> +    // rejects appending the buffer for whatever reason.
> +    auto data = WTFMove(m_pendingAppendData);
> +    m_private->append(WTFMove(data));

Nit: I would be more comfortable with an explicit call to "clear()" (with this
comment) than a double move.  Alternatively, this could be an
"ASSERT(!m_pendingAppend.size())", since the private not doing anything with
the passed in data is an exceptional condition.

Also, a future improvement to this area could be to move from storing incoming
data as a "Vector<unsigned char>" to a "SharedBuffer".	Appends would be
cheaper, and the Private's might be able to use the SharedBuffer directly.


More information about the webkit-reviews mailing list