mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
style: Add support for static references to servo_arc::Arc. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17186
This commit is contained in:
parent
b71a601a36
commit
f889b303da
2 changed files with 158 additions and 37 deletions
|
@ -129,6 +129,9 @@ impl UserAgentCascadeDataCache {
|
|||
}
|
||||
|
||||
fn expire_unused(&mut self) {
|
||||
// is_unique() returns false for static references, but we never have
|
||||
// static references to UserAgentCascadeDatas. If we did, it may not
|
||||
// make sense to put them in the cache in the first place.
|
||||
self.entries.retain(|e| !e.is_unique())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue