[Webkit-unassigned] [Bug 171602] REGRESSION(r215686): Incremental reads from SharedBuffer are wrong after r215686

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 8 09:03:13 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=171602

--- Comment #5 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 308899
  --> https://bugs.webkit.org/attachment.cgi?id=308899
Patch

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

>>> Source/WebCore/loader/TextTrackLoader.cpp:103
>>> +        m_parseOffset += bytesToUse;
>> 
>> There doesn't seem to be a test for this part of the patch. What does this fix?
> 
> I don't even know what TextTrackLoader is, but the pattern to read the data is exactly the same as in PNGEncoder, so this will fail the same way in case of incremental reads where bytesToSkip != 0 in any of the reads. Alex said he was going to add API to SharedBuffer to make it easier to read this way, so this and PNGEncoder will be updated too eventually.

To clarify, we shouldn't add API to SharedBuffer to read from a certain offset.  Since we always read entire segments from SharedBuffers, we should stop keeping track of how many bytes we have read and instead keep track of how many segments we have read.  Then we can skip to a segment with a known index instead of iterating all the segments and counting the number of bytes to skip.  This will require new SharedBuffer API, and it will make loading actually make sense.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170508/18d3d591/attachment-0001.html>


More information about the webkit-unassigned mailing list