Bug 1503738 - Simplify WITH_COMPARATOR macro slightly r=emilio
authorCameron McCormack <cam@mcc.id.au>
Thu, 01 Nov 2018 01:25:16 +0000
changeset 443890 20c962c86d1e56737a94215a1903c871b94718ac
parent 443889 80b31e11ccd3cd4b0c881dc02690229ff8c341a0
child 443891 2150b1a321795b7374a343c49e56bac4b07d2ac7
push id109471
push userebalazs@mozilla.com
push dateThu, 01 Nov 2018 09:46:37 +0000
treeherdermozilla-inbound@3a81ecf22e6f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1503738
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 1503738 - Simplify WITH_COMPARATOR macro slightly r=emilio Differential Revision: https://phabricator.services.mozilla.com/D10440
layout/style/GeckoBindings.cpp
--- a/layout/style/GeckoBindings.cpp
+++ b/layout/style/GeckoBindings.cpp
@@ -978,18 +978,17 @@ AttrEquals(Implementor* aElement, nsAtom
   auto match = [aStr, aIgnoreCase](const nsAttrValue* aValue) {
     return aValue->Equals(aStr, aIgnoreCase ? eIgnoreCase : eCaseMatters);
   };
   return DoMatch(aElement, aNS, aName, match);
 }
 
 #define WITH_COMPARATOR(ignore_case_, c_, expr_)    \
     if (ignore_case_) {                             \
-      const nsCaseInsensitiveStringComparator c_    \
-          = nsCaseInsensitiveStringComparator();    \
+      const nsCaseInsensitiveStringComparator c_;   \
       return expr_;                                 \
     } else {                                        \
       const nsDefaultStringComparator c_;           \
       return expr_;                                 \
     }
 
 
 template <typename Implementor>