Bug 1422538: Inline ServoElementSnapshot destructor. r?bz
No point in doing a function call for a default destructor.
MozReview-Commit-ID: Ll26umYyrKL
--- a/layout/style/ServoElementSnapshot.cpp
+++ b/layout/style/ServoElementSnapshot.cpp
@@ -22,21 +22,16 @@ ServoElementSnapshot::ServoElementSnapsh
{
MOZ_COUNT_CTOR(ServoElementSnapshot);
mIsHTMLElementInHTMLDocument =
aElement->IsHTMLElement() && aElement->IsInHTMLDocument();
mIsInChromeDocument = nsContentUtils::IsChromeDoc(aElement->OwnerDoc());
mSupportsLangAttr = aElement->SupportsLangAttr();
}
-ServoElementSnapshot::~ServoElementSnapshot()
-{
- MOZ_COUNT_DTOR(ServoElementSnapshot);
-}
-
void
ServoElementSnapshot::AddAttrs(Element* aElement,
int32_t aNameSpaceID,
nsAtom* aAttribute)
{
MOZ_ASSERT(aElement);
if (aNameSpaceID == kNameSpaceID_None) {
--- a/layout/style/ServoElementSnapshot.h
+++ b/layout/style/ServoElementSnapshot.h
@@ -66,17 +66,21 @@ class ServoElementSnapshot
typedef dom::BorrowedAttrInfo BorrowedAttrInfo;
typedef dom::Element Element;
typedef EventStates::ServoType ServoStateType;
public:
typedef ServoElementSnapshotFlags Flags;
explicit ServoElementSnapshot(const Element* aElement);
- ~ServoElementSnapshot();
+
+ ~ServoElementSnapshot()
+ {
+ MOZ_COUNT_DTOR(ServoElementSnapshot);
+ }
bool HasAttrs() const { return HasAny(Flags::Attributes); }
bool HasState() const { return HasAny(Flags::State); }
bool HasOtherPseudoClassState() const
{
return HasAny(Flags::OtherPseudoClassState);