Semantics for ProtectedHashMap.

MozReview-Commit-ID: K0m65uZi7iw
This commit is contained in:
Bobby Holley 2017-09-26 12:33:21 -07:00
parent e2c0ca5110
commit 98f370130d
9 changed files with 311 additions and 8 deletions

View file

@ -299,6 +299,24 @@ impl InvalidationMap {
Ok(())
}
/// Allows mutation of this InvalidationMap.
#[cfg(feature = "gecko")]
pub fn begin_mutation(&mut self) {
self.class_to_selector.begin_mutation();
self.id_to_selector.begin_mutation();
self.state_affecting_selectors.begin_mutation();
self.other_attribute_affecting_selectors.begin_mutation();
}
/// Disallows mutation of this InvalidationMap.
#[cfg(feature = "gecko")]
pub fn end_mutation(&mut self) {
self.class_to_selector.end_mutation();
self.id_to_selector.end_mutation();
self.state_affecting_selectors.end_mutation();
self.other_attribute_affecting_selectors.end_mutation();
}
}
/// A struct that collects invalidations for a given compound selector.