Bug 1508180 - Use uppercase names for high-order macros in dom/ r=mccr8
authorTed Campbell <tcampbell@mozilla.com>
Mon, 19 Nov 2018 17:31:17 +0000
changeset 503462 b020ea6c58e52c8ba94f92f5f52236d4cd74fa1a
parent 503461 43c0e876bc6f45d5228a6298ac5cd2f9a91009bb
child 503463 b4ac72eabda04e933eea9b0e9a35fa4f8c786c7d
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1508180
milestone65.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 1508180 - Use uppercase names for high-order macros in dom/ r=mccr8 Differential Revision: https://phabricator.services.mozilla.com/D12232
dom/base/nsWindowSizes.h
dom/security/nsCSPUtils.h
--- a/dom/base/nsWindowSizes.h
+++ b/dom/base/nsWindowSizes.h
@@ -87,20 +87,20 @@ struct nsStyleSizes
 
   // Present just to absorb the trailing comma in the constructor.
   int dummy;
 };
 
 #define NS_ARENA_SIZES_FIELD(classname) mArena##classname
 
 struct nsArenaSizes {
-#define FOR_EACH_SIZE(macro) \
-  macro(Other, mLineBoxes) \
-  macro(Style, mRuleNodes) \
-  macro(Style, mComputedStyles)
+#define FOR_EACH_SIZE(MACRO) \
+  MACRO(Other, mLineBoxes) \
+  MACRO(Style, mRuleNodes) \
+  MACRO(Style, mComputedStyles)
 
   nsArenaSizes()
     :
       FOR_EACH_SIZE(ZERO_SIZE)
 
       #define FRAME_ID(classname, ...) \
         NS_ARENA_SIZES_FIELD(classname)(0),
       #define ABSTRACT_FRAME_ID(...)
@@ -151,45 +151,45 @@ struct nsArenaSizes {
   // Present just to absorb the trailing comma in the constructor.
   int dummy;
 
 #undef FOR_EACH_SIZE
 };
 
 class nsWindowSizes
 {
-#define FOR_EACH_SIZE(macro) \
-  macro(DOM,   mDOMElementNodesSize) \
-  macro(DOM,   mDOMTextNodesSize) \
-  macro(DOM,   mDOMCDATANodesSize) \
-  macro(DOM,   mDOMCommentNodesSize) \
-  macro(DOM,   mDOMEventTargetsSize) \
-  macro(DOM,   mDOMMediaQueryLists) \
-  macro(DOM,   mDOMPerformanceUserEntries) \
-  macro(DOM,   mDOMPerformanceResourceEntries) \
-  macro(DOM,   mDOMOtherSize) \
-  macro(Style, mLayoutStyleSheetsSize) \
-  macro(Style, mLayoutShadowDomStyleSheetsSize) \
-  macro(Style, mLayoutShadowDomAuthorStyles) \
-  macro(Other, mLayoutPresShellSize) \
-  macro(Style, mLayoutStyleSetsStylistRuleTree) \
-  macro(Style, mLayoutStyleSetsStylistElementAndPseudosMaps) \
-  macro(Style, mLayoutStyleSetsStylistInvalidationMap) \
-  macro(Style, mLayoutStyleSetsStylistRevalidationSelectors) \
-  macro(Style, mLayoutStyleSetsStylistOther) \
-  macro(Style, mLayoutStyleSetsOther) \
-  macro(Style, mLayoutElementDataObjects) \
-  macro(Other, mLayoutTextRunsSize) \
-  macro(Other, mLayoutPresContextSize) \
-  macro(Other, mLayoutFramePropertiesSize) \
-  macro(Style, mLayoutComputedValuesDom) \
-  macro(Style, mLayoutComputedValuesNonDom) \
-  macro(Style, mLayoutComputedValuesVisited) \
-  macro(Other, mPropertyTablesSize) \
-  macro(Other, mBindingsSize) \
+#define FOR_EACH_SIZE(MACRO) \
+  MACRO(DOM,   mDOMElementNodesSize) \
+  MACRO(DOM,   mDOMTextNodesSize) \
+  MACRO(DOM,   mDOMCDATANodesSize) \
+  MACRO(DOM,   mDOMCommentNodesSize) \
+  MACRO(DOM,   mDOMEventTargetsSize) \
+  MACRO(DOM,   mDOMMediaQueryLists) \
+  MACRO(DOM,   mDOMPerformanceUserEntries) \
+  MACRO(DOM,   mDOMPerformanceResourceEntries) \
+  MACRO(DOM,   mDOMOtherSize) \
+  MACRO(Style, mLayoutStyleSheetsSize) \
+  MACRO(Style, mLayoutShadowDomStyleSheetsSize) \
+  MACRO(Style, mLayoutShadowDomAuthorStyles) \
+  MACRO(Other, mLayoutPresShellSize) \
+  MACRO(Style, mLayoutStyleSetsStylistRuleTree) \
+  MACRO(Style, mLayoutStyleSetsStylistElementAndPseudosMaps) \
+  MACRO(Style, mLayoutStyleSetsStylistInvalidationMap) \
+  MACRO(Style, mLayoutStyleSetsStylistRevalidationSelectors) \
+  MACRO(Style, mLayoutStyleSetsStylistOther) \
+  MACRO(Style, mLayoutStyleSetsOther) \
+  MACRO(Style, mLayoutElementDataObjects) \
+  MACRO(Other, mLayoutTextRunsSize) \
+  MACRO(Other, mLayoutPresContextSize) \
+  MACRO(Other, mLayoutFramePropertiesSize) \
+  MACRO(Style, mLayoutComputedValuesDom) \
+  MACRO(Style, mLayoutComputedValuesNonDom) \
+  MACRO(Style, mLayoutComputedValuesVisited) \
+  MACRO(Other, mPropertyTablesSize) \
+  MACRO(Other, mBindingsSize) \
 
 public:
   explicit nsWindowSizes(mozilla::SizeOfState& aState)
     :
       FOR_EACH_SIZE(ZERO_SIZE)
       mDOMEventTargetsCount(0),
       mDOMEventListenersCount(0),
       mArenaSizes(),
--- a/dom/security/nsCSPUtils.h
+++ b/dom/security/nsCSPUtils.h
@@ -114,25 +114,25 @@ inline CSPDirective CSP_StringToCSPDirec
     if (lowerDir.EqualsASCII(CSPStrDirectives[i])) {
       return static_cast<CSPDirective>(i);
     }
   }
   NS_ASSERTION(false, "Can not convert unknown Directive to Integer");
   return nsIContentSecurityPolicy::NO_DIRECTIVE;
 }
 
-#define FOR_EACH_CSP_KEYWORD(macro) \
-  macro(CSP_SELF,            "'self'") \
-  macro(CSP_UNSAFE_INLINE,   "'unsafe-inline'") \
-  macro(CSP_UNSAFE_EVAL,     "'unsafe-eval'") \
-  macro(CSP_NONE,            "'none'") \
-  macro(CSP_NONCE,           "'nonce-") \
-  macro(CSP_REQUIRE_SRI_FOR, "require-sri-for") \
-  macro(CSP_REPORT_SAMPLE,   "'report-sample'") \
-  macro(CSP_STRICT_DYNAMIC,  "'strict-dynamic'")
+#define FOR_EACH_CSP_KEYWORD(MACRO) \
+  MACRO(CSP_SELF,            "'self'") \
+  MACRO(CSP_UNSAFE_INLINE,   "'unsafe-inline'") \
+  MACRO(CSP_UNSAFE_EVAL,     "'unsafe-eval'") \
+  MACRO(CSP_NONE,            "'none'") \
+  MACRO(CSP_NONCE,           "'nonce-") \
+  MACRO(CSP_REQUIRE_SRI_FOR, "require-sri-for") \
+  MACRO(CSP_REPORT_SAMPLE,   "'report-sample'") \
+  MACRO(CSP_STRICT_DYNAMIC,  "'strict-dynamic'")
 
 enum CSPKeyword {
   #define KEYWORD_ENUM(id_, string_) id_,
   FOR_EACH_CSP_KEYWORD(KEYWORD_ENUM)
   #undef KEYWORD_ENUM
 
   // CSP_LAST_KEYWORD_VALUE always needs to be the last element in the enum
   // because we use it to calculate the size for the char* array.