[webkit-reviews] review requested: [Bug 81123] cue.text fails for some track element cues : [Attachment 213857] Only use buffer when needed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 10 01:04:29 PDT 2013


Brendan Long <b.long at cablelabs.com> has asked  for review:
Bug 81123: cue.text fails for some track element cues
https://bugs.webkit.org/show_bug.cgi?id=81123

Attachment 213857: Only use buffer when needed
https://bugs.webkit.org/attachment.cgi?id=213857&action=review

------- Additional Comments from Brendan Long <b.long at cablelabs.com>
Ok, here's one more improvement. It bothered me that my patch was buffering
everything, even if we didn't need it. This version only copies data to the
buffer if we run out of data without finding a line ending. Because of this,
collectNextLine() doesn't need to look at the contents of the buffer, since we
already know it doesn't contain any line endings. More importantly, since it
always contains one partial line, instead of removing from the front of the
vector, we can just clear it, which is significantly more efficient.


More information about the webkit-reviews mailing list