Closed
Bug 813800
Opened 13 years ago
Closed 13 years ago
ShouldRevalidateEntry() in imgLoader.cpp should return false for any data URI
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: seth, Assigned: seth)
Details
Attachments
(1 file)
1.04 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
Currently data URIs end up getting revalidated in imagelib, which doesn't make much sense as they're immutable. Due to unfortunate details of the way validation is performed, a new imgRequest is created every time a data URI is revalidated, which is even more wasteful. We can avoid the problem entirely by returning |false| from ShouldRevalidateEntry() whenever we're dealing with a data URI.
Assignee | ||
Comment 1•13 years ago
|
||
CC'ing Jason Duell on this just to make sure there isn't some hidden necko reason why revalidating data URIs is necessary.
Assignee | ||
Comment 2•13 years ago
|
||
Proposed patch. Requesting review.
Attachment #683809 -
Flags: review?(joe)
Assignee | ||
Comment 3•13 years ago
|
||
(Ended up putting the check in ValidateEntry() instead of ShouldRevalidateEntry() since we have the URI available there and there are lots of similar checks in that spot.)
Comment 4•13 years ago
|
||
Comment on attachment 683809 [details] [diff] [review]
Never revalidate data URIs.
Review of attachment 683809 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not sure whether it makes more sense for this to be nearer the file:/// section above, but w/e.
Attachment #683809 -
Flags: review?(joe) → review+
Assignee | ||
Comment 5•13 years ago
|
||
I was nervous to move it above the CORS/principal check without being really sure as to what I was doing. =)
Assignee | ||
Comment 6•13 years ago
|
||
Try job here: https://tbpl.mozilla.org/?tree=Try&rev=74be7412b31a
Comment 8•13 years ago
|
||
Keywords: checkin-needed
Nice.
Comment 10•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 11•12 years ago
|
||
Try run for 74be7412b31a is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=74be7412b31a
Results (out of 256 total builds):
success: 246
warnings: 9
failure: 1
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/mfowler@mozilla.com-74be7412b31a
You need to log in
before you can comment on or make changes to this bug.
Description
•