[webkit-reviews] review granted: [Bug 226034] [GPUP][MSE] QuotaExceededError Exception not thrown even if the sum of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize : [Attachment 430570] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 4 09:28:23 PDT 2021


Eric Carlson <eric.carlson at apple.com> has granted Jean-Yves Avenard [:jya]
<jya at apple.com>'s request for review:
Bug 226034: [GPUP][MSE] QuotaExceededError Exception not thrown even if the sum
of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize
https://bugs.webkit.org/show_bug.cgi?id=226034

Attachment 430570: Patch

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




--- Comment #7 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 430570
  --> https://bugs.webkit.org/attachment.cgi?id=430570
Patch

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

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:494
> -    m_private->evictCodedFrames(size, m_pendingAppendData.capacity(),
maximumBufferSize(), m_source->currentTime(), m_source->duration(),
m_source->isEnded());
> +    m_private->evictCodedFrames(size, m_pendingAppendData.size(),
maximumBufferSize(), m_source->currentTime(), m_source->duration(),
m_source->isEnded());
>  
>      // 5. If the buffer full flag equals true, then throw a
QuotaExceededError exception and abort these step.
> -    if (m_private->bufferFull() || m_private->totalTrackBufferSizeInBytes()
+ m_pendingAppendData.capacity() + size >= maximumBufferSize()) {
> +    if (m_private->bufferFull() || m_private->totalTrackBufferSizeInBytes()
+ m_pendingAppendData.size() + size >= maximumBufferSize()) {

Good catch!


More information about the webkit-reviews mailing list