Closed
Bug 1283359
Opened 9 years ago
Closed 9 years ago
Use StreamingLexer in the JPEG decoder
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: seth, Assigned: seth)
References
Details
Attachments
(1 file)
15.17 KB,
patch
|
eflores
:
review+
|
Details | Diff | Splinter Review |
The JPEG decoder is the last remaining image decoder that doesn't use StreamingLexer. See bug 1282566 comment 0 for why it's important that all image decoders use StreamingLexer.
Assignee | ||
Comment 1•9 years ago
|
||
Here's the patch. The approach is the same as in bug 1282566 - just wrap the
existing decoder code in an unbuffered read. Unfortunately the existing JPEG
decoder code is somewhat hairy, so the results aren't as nice, but cleaning up
the JPEG decoder is something that we can put off for another bug.
The only thing that really had to be updated in the existing JPEG decoder state
machine was to replace simple |return| statements with |return
Transition::TerminateSuccess()| or |return Transition::TerminateFailure()|. We
continue setting the |mState| variable to indicate e.g. JPEG_ERROR for now, even
though it's not really necessary, because there is some code continuing to look
at the value in nsJPEGDecoder::FinishInternal(). We can almost certainly remove
that code, but I'd prefer to do that in a separate bug.
Attachment #8766649 -
Flags: review?(edwin)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8766649 -
Flags: review?(edwin) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Thanks for the review!
Pushed by mfowler@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/23ecfc796432
Use StreamingLexer in the JPEG decoder. r=edwin
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•