Bug 1515707 - Use NS_INTERFACE_MAP_END_INHERITING in some CSSStyleDeclaration implementations. r=Ehsan
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 20 Dec 2018 19:32:51 +0000
changeset 451577 1cd2c6c217949d0b1d06f15046eba45ff4517044
parent 451576 3f2e61c2ab7cc9378f923b59f26edc497e3db235
child 451578 a6dedc3746e62e4165edcedea43cedb6e57fba43
push id35247
push userebalazs@mozilla.com
push dateFri, 21 Dec 2018 09:36:28 +0000
treeherdermozilla-central@84931341bac1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1515707
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1515707 - Use NS_INTERFACE_MAP_END_INHERITING in some CSSStyleDeclaration implementations. r=Ehsan This has no behavior change, since it just expands to NS_IMPL_QUERY_TAIL_INHERITING, but it's clearer, and clang-format understands it. Also, these are the only uses of this macro, so I don't think we should make clang-format understand it. Differential Revision: https://phabricator.services.mozilla.com/D15125
layout/style/CSSPageRule.cpp
layout/style/CSSStyleRule.cpp
layout/style/nsDOMCSSAttrDeclaration.cpp
--- a/layout/style/CSSPageRule.cpp
+++ b/layout/style/CSSPageRule.cpp
@@ -26,18 +26,18 @@ CSSPageRuleDeclaration::~CSSPageRuleDecl
 // QueryInterface implementation for CSSPageRuleDeclaration
 NS_INTERFACE_MAP_BEGIN(CSSPageRuleDeclaration)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   // We forward the cycle collection interfaces to Rule(), which is
   // never null (in fact, we're part of that object!)
   if (aIID.Equals(NS_GET_IID(nsCycleCollectionISupports)) ||
       aIID.Equals(NS_GET_IID(nsXPCOMCycleCollectionParticipant))) {
     return Rule()->QueryInterface(aIID, aInstancePtr);
-  } else
-    NS_IMPL_QUERY_TAIL_INHERITING(nsDOMCSSDeclaration)
+  }
+NS_INTERFACE_MAP_END_INHERITING(nsDOMCSSDeclaration)
 
   NS_IMPL_ADDREF_USING_AGGREGATOR(CSSPageRuleDeclaration, Rule())
   NS_IMPL_RELEASE_USING_AGGREGATOR(CSSPageRuleDeclaration, Rule())
 
   /* nsDOMCSSDeclaration implementation */
 
   css::Rule* CSSPageRuleDeclaration::GetParentRule() { return Rule(); }
 
--- a/layout/style/CSSStyleRule.cpp
+++ b/layout/style/CSSStyleRule.cpp
@@ -30,18 +30,18 @@ CSSStyleRuleDeclaration::~CSSStyleRuleDe
 // QueryInterface implementation for CSSStyleRuleDeclaration
 NS_INTERFACE_MAP_BEGIN(CSSStyleRuleDeclaration)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   // We forward the cycle collection interfaces to Rule(), which is
   // never null (in fact, we're part of that object!)
   if (aIID.Equals(NS_GET_IID(nsCycleCollectionISupports)) ||
       aIID.Equals(NS_GET_IID(nsXPCOMCycleCollectionParticipant))) {
     return Rule()->QueryInterface(aIID, aInstancePtr);
-  } else
-    NS_IMPL_QUERY_TAIL_INHERITING(nsDOMCSSDeclaration)
+  }
+NS_INTERFACE_MAP_END_INHERITING(nsDOMCSSDeclaration)
 
   NS_IMPL_ADDREF_USING_AGGREGATOR(CSSStyleRuleDeclaration, Rule())
   NS_IMPL_RELEASE_USING_AGGREGATOR(CSSStyleRuleDeclaration, Rule())
 
   /* nsDOMCSSDeclaration implementation */
 
   css::Rule* CSSStyleRuleDeclaration::GetParentRule() { return Rule(); }
 
--- a/layout/style/nsDOMCSSAttrDeclaration.cpp
+++ b/layout/style/nsDOMCSSAttrDeclaration.cpp
@@ -53,17 +53,17 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_
 
 NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsDOMCSSAttributeDeclaration)
   return tmp->HasKnownLiveWrapper() ||
          (tmp->mElement && Element::CanSkipThis(tmp->mElement));
 NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMCSSAttributeDeclaration)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_IMPL_QUERY_TAIL_INHERITING(nsDOMCSSDeclaration)
+NS_INTERFACE_MAP_END_INHERITING(nsDOMCSSDeclaration)
 
   NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMCSSAttributeDeclaration)
   NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCSSAttributeDeclaration)
 
   nsresult nsDOMCSSAttributeDeclaration::SetCSSDeclaration(
       DeclarationBlock * aDecl, MutationClosureData * aClosureData) {
     NS_ASSERTION(mElement, "Must have Element to set the declaration!");