-
Emilio Cobos Álvarez authored
Bug 1639262 - Avoid duplicate entries in the stylesheet cache. r=nordzilla,firefox-style-system-reviewers 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. Differential Revision: https://phabricator.services.mozilla.com/D76000
a147afc0