Bug 851892 part 4. Make css::Rule wrappercached. r=heycam,peterv

Note that this increases the size of css::Rule by three words, unfortunately.
This commit is contained in:
Boris Zbarsky
2017-01-13 10:41:02 -05:00
parent 23f3a6e51f
commit 71bd55efef
10 changed files with 217 additions and 9 deletions

View File

@@ -104,6 +104,7 @@ ServoStyleRule::ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule)
, mRawRule(aRawRule)
, mDecls(Servo_StyleRule_GetStyle(mRawRule).Consume())
{
SetIsNotDOMBinding();
}
// QueryInterface implementation for ServoStyleRule
@@ -152,6 +153,14 @@ ServoStyleRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
return aMallocSizeOf(this);
}
/* virtual */ JSObject*
ServoStyleRule::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto)
{
NS_NOTREACHED("We called SetIsNotDOMBinding() in our constructor");
return nullptr;
}
#ifdef DEBUG
void
ServoStyleRule::List(FILE* out, int32_t aIndent) const