Bug 1422538: Inline ServoElementSnapshot destructor. r?bz draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 02 Dec 2017 23:12:41 +0100
changeset 706631 7acf5a4e7e5fb0b32517ab919ae7538b3b7d53f2
parent 706630 10d7416e8ee606759df4d14b5c9a8aa3adaad992
child 706632 1a135e9207dab5d47687080692d4275b9cffd553
push id91862
push userbmo:emilio@crisal.io
push dateSat, 02 Dec 2017 23:34:31 +0000
reviewersbz
bugs1422538
milestone59.0a1
Bug 1422538: Inline ServoElementSnapshot destructor. r?bz No point in doing a function call for a default destructor. MozReview-Commit-ID: Ll26umYyrKL
layout/style/ServoElementSnapshot.cpp
layout/style/ServoElementSnapshot.h
--- 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);