Make the CSS cache more generic
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Assignee | ||
Comment 1•3 years ago
|
||
This moves the style-specific bits of the shared style sheet cache into
a super-class, and leaves the generic "sub-resource management" bits
inside a base class. In order to implement it you need to provide some
types, mainly:
-
Loader, which implements LoaderPrincipal() and allows you to key per
principal. The idea is that this would be the
{CSS,Script,Image}Loader object. -
Key (self explanatory). We might want to introduce a common key to
share the cache partitioning logic. -
Value, which represents the final cached value. This is expected to
be a StyleSheet / Stencil / imgRequestProxy. -
LoadingValue, which must inherit from
SharedSubResourceCacheLoadingValueBase (which contains the linked
list and the state that the cache manages). It also must provide a
ValueForCache() and ExpirationTime() members. For style, this is the
SheetLoadData. For script this will probably be the
ScriptLoadRequest. For images it might be enough with the
imgRequestProxy, but we might need something else, haven't looked
into it too deeply yet.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Changing severity to S4 because no user impact.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2cf0e1f9a018 Refactor shared sheet cache into something more reusable. r=jwatt
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/84750288c75c Call malloc_size_of on the derived pointer to avoid ASAN complaints.
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2cf0e1f9a018
https://hg.mozilla.org/mozilla-central/rev/84750288c75c
Description
•