Measure selectors.

This patch adds measurement of Selectors within StyleRule. This requires
exposing the pointer within ThinArc.

The patch also adds measurement of the several CssRule variants, in order to
measure nested CssRules (and PropertyDeclarationBlocks) within them:
DocumentRule, MediaRule, PageRule, SupportsRule.
This commit is contained in:
Nicholas Nethercote 2017-09-07 13:24:40 +10:00
parent 812cac78f0
commit 61877b7316
8 changed files with 95 additions and 15 deletions

View file

@ -676,6 +676,12 @@ impl<H: 'static, T: 'static> ThinArc<H, T> {
// Forward the result.
result
}
/// Returns the address on the heap of the ThinArc itself -- not the T
/// within it -- for memory reporting.
pub fn heap_ptr(&self) -> *const c_void {
self.ptr as *const ArcInner<T> as *const c_void
}
}
impl<H, T> Deref for ThinArc<H, T> {