Open Bug 1713088 Opened 3 years ago Updated 3 years ago

imgLoader::RemoveEntriesFromPrincipal over clears partitioned cache

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

People

(Reporter: pbz, Unassigned)

References

(Blocks 1 open bug)

Details

imgLoader::RemoveEntriesFromPrincipal over-clears, since it does not look at the cache key's isolationKey when filtering entries by principal. It should compare the isolationKey with the principal partitionKey.

We compare the origin attributes of key and principal here: https://searchfox.org/mozilla-central/rev/2b372b94ce057097a6ef8eb725f209faa9d1dc4d/image/imgLoader.cpp#1372

There is also a case where we "under-clear": if we pass in a principal which sets a partitionKey we will never match any cache entries since the keys origin attributes never contain a partitionKey.

Blocks: 1550317
Flags: needinfo?(aosmond)
Flags: needinfo?(aosmond)
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.