Bug 1422538: Inline ServoElementSnapshot destructor. r?bz draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 02 Dec 2017 23:12:41 +0100
changeset 706617 2c37a64eb017d31f6e546d7eeb4807509871a895
parent 706613 724f42a649ce5e3d80d322bc14d707b2e3f054ec
child 706618 7f7857650ae629ef588c5581551c4bd44666516d
push id91859
push userbmo:emilio@crisal.io
push dateSat, 02 Dec 2017 22:33:42 +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);