Closed
Bug 1098108
Opened 10 years ago
Closed 10 years ago
Use assertions to ensure that ProgressTracker reports progress in a consistent way
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: seth, Assigned: seth)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 1 obsolete file)
2.18 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
2.07 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
2.07 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
3.32 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
3.89 KB,
patch
|
Details | Diff | Splinter Review |
Right now there's nothing stopping us from reporting progress to ProgressTracker (and hence sending out imgINotificationObserver notifications) in almost any order. However, there is a lot of code that relies on these notifications arriving in a specific order.
We should add code to verify that we report progress in the same way consistently. It turns out that doing that immediately revealed some bugs in ImageLib, though the issues are relatively minor, so this bug will also contain the patches that fix those bugs and make the initial set of assertions pass. Hopefully we can continue to make these assertions stronger over time.
Assignee | ||
Comment 1•10 years ago
|
||
This is a recent regression from the refactorings in bug 910441. It got detected immediately by these assertions.
Attachment #8521921 -
Flags: review?(tnikkel)
Assignee | ||
Comment 2•10 years ago
|
||
We don't send DECODE_STARTED or ONLOAD_BLOCKED for size decodes, so we shouldn't send DECODE_STOPPED or ONLOAD_UNBLOCKED, either.
Attachment #8521926 -
Flags: review?(tnikkel)
Assignee | ||
Comment 3•10 years ago
|
||
We weren't recording REQUEST_STARTED and REQUEST_STOPPED for imgTools decodes.
Attachment #8521927 -
Flags: review?(tnikkel)
Assignee | ||
Comment 4•10 years ago
|
||
This is the patch where we actually add the consistency checks. These are the strongest preconditions I could determine right now; we may be able to make these stronger over time.
I didn't |#ifdef DEBUG| CheckProgressConsistency because, since it contains only |if| blocks and |MOZ_ASSERT| calls, it should have exactly the behavior we want already: it'll be optimized away in builds with optimizations on and assertions disabled.
Attachment #8521928 -
Flags: review?(tnikkel)
Assignee | ||
Comment 5•10 years ago
|
||
Here's a try job:
https://tbpl.mozilla.org/?tree=Try&rev=b93b7a047881
Updated•10 years ago
|
Attachment #8521921 -
Flags: review?(tnikkel) → review+
Updated•10 years ago
|
Attachment #8521926 -
Flags: review?(tnikkel) → review+
Updated•10 years ago
|
Attachment #8521927 -
Flags: review?(tnikkel) → review+
Updated•10 years ago
|
Attachment #8521928 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Looks like we need an additional tweak here. Resniffed multipart requests weren't progressing the same as normal requests. I also strengthened the assertion in imgStatusTracker::SetIsMultipart.
Attachment #8522543 -
Flags: review?(tnikkel)
Assignee | ||
Comment 7•10 years ago
|
||
The old part 4 is now part 5. I've tweaked how the assertions behave w.r.t. multipart requests. Nothing else has changed.
Assignee | ||
Updated•10 years ago
|
Attachment #8521928 -
Attachment is obsolete: true
Assignee | ||
Comment 8•10 years ago
|
||
Here's a new try job:
https://tbpl.mozilla.org/?tree=Try&rev=a35286609a01
Updated•10 years ago
|
Attachment #8522543 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Thanks for the review! Tests look good, too.
Assignee | ||
Comment 10•10 years ago
|
||
Pushed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2750a8bef37d
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a54f722b1cd
https://hg.mozilla.org/integration/mozilla-inbound/rev/e51b39c7d64b
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b3a6fee879c
https://hg.mozilla.org/integration/mozilla-inbound/rev/c786bdac4406
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2750a8bef37d
https://hg.mozilla.org/mozilla-central/rev/4a54f722b1cd
https://hg.mozilla.org/mozilla-central/rev/e51b39c7d64b
https://hg.mozilla.org/mozilla-central/rev/0b3a6fee879c
https://hg.mozilla.org/mozilla-central/rev/c786bdac4406
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•