Bug 1381844: Remove a few redundant casts. r=bholley
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 21 Jul 2017 02:31:49 +0200
changeset 419078 c9ee2503c1202a05b7a0c9899fac00ccb64e34c0
parent 419077 82375c7805072ba367c9cd0eccaca728112729fc
child 419079 e8691885ec732b4e49ac660db8e939fcef1f4275
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1381844
milestone56.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 1381844: Remove a few redundant casts. r=bholley MozReview-Commit-ID: 2dr72PMGKwN
layout/style/nsStyleContextInlines.h
--- a/layout/style/nsStyleContextInlines.h
+++ b/layout/style/nsStyleContextInlines.h
@@ -83,17 +83,17 @@ const nsStyle##name_ * nsStyleContext::D
       /* We always cache inherited structs on the context when we */\
       /* compute them. */                                           \
       return nullptr;                                               \
     }                                                               \
     /* Have the rulenode deal */                                    \
     AUTO_CHECK_DEPENDENCY(gecko, eStyleStruct_##name_);             \
     const nsStyle##name_ * newData =                                \
       gecko->RuleNode()->                                           \
-        GetStyle##name_<aComputeData>(this->AsGecko(), mBits);      \
+        GetStyle##name_<aComputeData>(gecko, mBits);                \
     /* always cache inherited data on the style context; the rule */\
     /* node set the bit in mBits for us if needed. */               \
     gecko->mCachedInheritedData                                     \
       .mStyleStructs[eStyleStruct_##name_] =                        \
       const_cast<nsStyle##name_ *>(newData);                        \
     return newData;                                                 \
   }                                                                 \
   auto servo = AsServo();                                           \
@@ -150,18 +150,18 @@ const nsStyle##name_ * nsStyleContext::D
     if (gecko->mCachedResetData) {                                            \
       const nsStyle##name_ * cachedData =                                     \
         static_cast<nsStyle##name_*>(                                         \
           gecko->mCachedResetData->mStyleStructs[eStyleStruct_##name_]);      \
       if (cachedData) /* Have it cached already, yay */                       \
         return cachedData;                                                    \
     }                                                                         \
     /* Have the rulenode deal */                                              \
-    AUTO_CHECK_DEPENDENCY(gecko, eStyleStruct_##name_);                              \
-    return gecko->RuleNode()->GetStyle##name_<aComputeData>(this->AsGecko()); \
+    AUTO_CHECK_DEPENDENCY(gecko, eStyleStruct_##name_);                       \
+    return gecko->RuleNode()->GetStyle##name_<aComputeData>(gecko);           \
   }                                                                           \
   auto servo = AsServo();                                                     \
   const bool needToCompute = !(mBits & NS_STYLE_INHERIT_BIT(name_));          \
   if (!aComputeData && needToCompute) {                                       \
     return nullptr;                                                           \
   }                                                                           \
   const nsStyle##name_* data =                                                \
     servo->ComputedData()->GetStyle##name_();                               \