зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1353998 - Start measuring Stylo style sheet memory usage. r=heycam.
--HG-- extra : rebase_source : 85f83566643e7b4c2276f0bf3fbb1a907f58fe0e
This commit is contained in:
Родитель
fea32e83c0
Коммит
da7ad06b3b
|
@ -50,6 +50,8 @@ SERVO_BINDING_FUNC(Servo_StyleSheet_GetRules, ServoCssRulesStrong,
|
|||
RawServoStyleSheetBorrowed sheet)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSheet_Clone, RawServoStyleSheetStrong,
|
||||
RawServoStyleSheetBorrowed sheet)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSheet_SizeOfIncludingThis, size_t,
|
||||
mozilla::MallocSizeOf malloc_size_of, RawServoStyleSheetBorrowed sheet)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_Init, RawServoStyleSetOwned, RawGeckoPresContextOwned pres_context)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_Clear, void,
|
||||
RawServoStyleSetBorrowed set)
|
||||
|
|
|
@ -321,6 +321,7 @@ structs-types = [
|
|||
"mozilla::css::GridTemplateAreasValue",
|
||||
"mozilla::css::ImageValue",
|
||||
"mozilla::css::URLValue",
|
||||
"mozilla::MallocSizeOf",
|
||||
"mozilla::Side",
|
||||
"RawGeckoAnimationPropertySegment",
|
||||
"RawGeckoComputedTiming",
|
||||
|
|
|
@ -59,13 +59,13 @@ ServoStyleSheetInner::CloneFor(StyleSheet* aPrimarySheet)
|
|||
static_cast<ServoStyleSheet*>(aPrimarySheet));
|
||||
}
|
||||
|
||||
MOZ_DEFINE_MALLOC_SIZE_OF(ServoStyleSheetMallocSizeOf)
|
||||
|
||||
size_t
|
||||
ServoStyleSheetInner::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
size_t n = aMallocSizeOf(this);
|
||||
|
||||
// XXX: need to measure mSheet
|
||||
|
||||
n += Servo_StyleSheet_SizeOfIncludingThis(ServoStyleSheetMallocSizeOf, mSheet);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче