Closed Bug 1639262 Opened 3 months ago Closed 3 months ago

StyleSheet cache over-reports memory.

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

No description provided.

When the loader finds an already-complete stylesheet, it will call
PostLoadEvent to fire the load event of the relevant <link> element,
etc.

For that, it'll mint a SheetLoadData, with various fields hard-coded.
That causes us to eventually insert the sheet in mCompleteSheets, but
with a different key, which means we'll end up with two copies of the
same stylesheet in the cache, than when reporting memory we'll report
twice.

Fix it by constructing the right load data a bit sooner, and add an
assertion to ensure this doesn't happen anymore.

This could also cause mismatches in the cache for no good reason.

Depends on D76000

Severity: -- → S3
Blocks: 1639392
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf1939b293d9
Avoid duplicate entries in the stylesheet cache. r=nordzilla,firefox-style-system-reviewers
https://hg.mozilla.org/integration/autoland/rev/191820bda8f5
Get the right "is preload" value to CreateSheet. r=nordzilla
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.