The default bug view has changed. See this FAQ.

Shutdown the decoder in SourceDataComplete() if decoding is already finished

RESOLVED FIXED in mozilla14

Status

()

Core
ImageLib
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rclick, Assigned: rclick)

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
For the BMP decoder we don't shutdown the decoder until we've decoded all the data, and we don't know that until SourceDataComplete() is called. If the decode worker decodes all the data before SourceDataComplete(), we won't do an UNTIL_SIZE decode and the decoder is shutdown asynchronously.

This is a problem because the RasterImage doesn't notice some errors until the decoder is shutdown, which means that we'll sometimes fire onload when we otherwise would have fired onerror. I believe that this discrepancy is the cause of the reftest failures in bug 721917.

Patch coming up shortly.
(Assignee)

Comment 1

5 years ago
Created attachment 604684 [details] [diff] [review]
patch

This changes UNTIL_SIZE decodes so that instead of returning early if the size is already known, we only skip the decoding loop. That way we'll check if decoding is finished and shutdown the decoder.
Assignee: nobody → rclickenbrock
Status: NEW → ASSIGNED
(Assignee)

Updated

5 years ago
Blocks: 721917
Don't forget to ask for review :)
(Assignee)

Comment 3

5 years ago
Comment on attachment 604684 [details] [diff] [review]
patch

Right, I forgot the review flag. I'm out of town for the week, so no need to rush on the review. I'll address any review comments and do some try runs when I return.
Attachment #604684 - Flags: review?(joe)
Attachment #604684 - Flags: review?(joe) → review+
(Assignee)

Comment 4

5 years ago
Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=f1667d464be7

Comment 5

5 years ago
Try run for f1667d464be7 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=f1667d464be7
Results (out of 224 total builds):
    exception: 3
    success: 188
    warnings: 17
    failure: 16
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/rclickenbrock@gmail.com-f1667d464be7
(Assignee)

Comment 6

5 years ago
Created attachment 609289 [details] [diff] [review]
patch for check-in [r=joe]
Attachment #604684 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/dcfd02b6aea7
Keywords: checkin-needed
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/dcfd02b6aea7
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.