Closed Bug 947918 Opened 9 years ago Closed 9 years ago

Support seeking to end of BlobView

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tzimmermann, Assigned: tzimmermann)

Details

Attachments

(1 file)

Currently it's not possible to seek to the end of a BlobView buffer, because seek doesn't accept the length value. This was discovered while working on bug 916850.

If you have a buffer of n bytes length and you're at offset 0, reading n bytes will increment the offset to be equal to the buffer length. Seeking n bytes should give the same result. BlobView already contains the function 'advance', which is just a seek that works relative to the current position, and it supports the described behavior.
Attached file Github pull request
Hi Paul,

Here is a patch for this minor problem that I discovered while working on the OGG meta-data parser.
Attachment #8344638 - Flags: review?(paul)
Attachment #8344638 - Flags: review?(paul) → review+
Hi Anthony,

Please merge the pull request on github. Thanks!
Flags: needinfo?(anthony)
Merged in https://github.com/mozilla-b2g/gaia/commit/ebae4e59d2d5f12a9094f30818a888099c07991f

Thomas: You can set checkin-needed to get a patch landed.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(anthony)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.