Closed
Bug 481553
Opened 16 years ago
Closed 16 years ago
possible for imgRequests to think they're in the cache when they aren't
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b4
People
(Reporter: joe, Unassigned)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file)
(deleted),
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
This is a problem I've found by code inspection, but I've never been able to cause it to happen in running code. Its nature is such that it could cause bug 480352; if it does fix that problem, though, I have no clue how the patch from bug 466586 could have caused it, nor why it'd only show up on Windows (at least on crash-stats).
If an image load comes in on one page (or on one thread) for an image that's already being loaded on a different page (or on a different thread), we correctly don't cache the second load, and let it load all by its lonesome. However, the second imgRequest still thinks it's cached, and will ask the image cache to remove itself when it's cancelled, etc. The problem is that the cache can't easily tell the difference between duplicate imgCacheEntries/imgRequests for the same URL.
I will have to think hard about how to test this. As I mentioned, I've never seen this happen.
Reporter | ||
Comment 1•16 years ago
|
||
Attachment #365581 -
Flags: review?(vladimir)
Attachment #365581 -
Flags: review?(vladimir) → review+
Reporter | ||
Comment 2•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/dc3e1ab79397
Fingers crossed...
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Target Milestone: --- → mozilla1.9.2a1
Comment 3•16 years ago
|
||
This case (same image requested by multiple pages) does in fact get hit. Write a test for this, perhaps? It doesn't seem like it should be that hard with a page and an iframe...
Do we need this on 1.9.1?
Reporter | ||
Comment 4•16 years ago
|
||
I slightly misread the code. This patch only fixes the case of loading from a different thread; in that case, it was possible for the problem described to happen. So, only if we're in the middle of loading on one thread, and then on a different thread, try to load the same image.
I don't know that this is actually possible, though.
Comment 5•16 years ago
|
||
Shouldn't be. All loads happen on the main thread.
Reporter | ||
Comment 6•16 years ago
|
||
Stuart, why was there all that thread machinery in the image cache to begin with, then?
Reporter | ||
Comment 7•16 years ago
|
||
Stuart tells me the thread stuff is in imglib for the ability to decode on different threads, which we don't do right now.
Reporter | ||
Updated•16 years ago
|
Flags: blocking1.9.1?
Flags: blocking1.9.1? → blocking1.9.1+
Reporter | ||
Comment 8•16 years ago
|
||
Keywords: fixed1.9.1
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b4
You need to log in
before you can comment on or make changes to this bug.
Description
•