Assert that an imgRequest's original URI and the URI of its cache key match

NEW
Assigned to

Status

()

Core
ImageLib
P3
normal
3 years ago
7 months ago

People

(Reporter: seth, Assigned: seth)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

(Assignee)

Description

3 years ago
The image cache is keyed on the original URI of each image - that is, the URI before redirects.

To make this work, we rely in places on nsIChannel::GetOriginalURI() actually returning that original URI - the one passed to LoadImage().

I want to add an assertion that this is always the case. However, we seem to have a lot of bugs in this area! I've already discovered and fixed bug 1163866 while trying to add this assertion in bug 1160703, but there seem to be more issues.

I think it's better to land the assertion in this bug, which can depend on the fixes for any further Necko-level issues that get discovered.
To my understanding, the problem here is that for an image loaded via a .sjs that redirects to a data URI, GetOriginalURI returns the data URI instead of the .sjs.
This problem only seems to appear on the test infrastructure, and not when the test is run locally.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=0e95c06b5045

Also, from the try run, I'm inclined to believe this is only for e10s.
Whiteboard: [gfx-noted]
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.