Bug 1304302 part 2 - Some small fixes. r=heycam
authorXidorn Quan <me@upsuper.org>
Mon, 26 Sep 2016 22:03:25 +1000
changeset 315276 12e6d7c5a65f19c168c4dd6a4c68f2606b84a711
parent 315275 ddf6782170cd09b8228702d143bafd34a8fde570
child 315277 de7d09b0a5a5ba7bee4d30ea5b871abb9882b2ed
push id30747
push usercbook@mozilla.com
push dateTue, 27 Sep 2016 09:22:00 +0000
treeherdermozilla-central@66a77b9bfe5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1304302
milestone52.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 1304302 part 2 - Some small fixes. r=heycam MozReview-Commit-ID: 7rnl4wkMorC
layout/style/Loader.cpp
layout/style/ServoStyleSheet.cpp
layout/style/StyleSheetHandleInlines.h
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -1116,17 +1116,17 @@ Loader::CreateSheet(nsIURI* aURI,
     }
 #endif
 
     bool fromCompleteSheets = false;
     if (!sheet) {
       // Then our per-document complete sheets.
       URIPrincipalReferrerPolicyAndCORSModeHashKey key(aURI, aLoaderPrincipal, aCORSMode, aReferrerPolicy);
 
-      StyleSheetHandle completeSheet;
+      StyleSheetHandle completeSheet = nullptr;
       mSheets->mCompleteSheets.Get(&key, &completeSheet);
       sheet = completeSheet;
       LOG(("  From completed: %p", sheet->AsVoidPtr()));
 
       fromCompleteSheets = !!sheet;
     }
 
     if (sheet) {
--- a/layout/style/ServoStyleSheet.cpp
+++ b/layout/style/ServoStyleSheet.cpp
@@ -27,17 +27,17 @@ bool
 ServoStyleSheet::IsApplicable() const
 {
   return !mDisabled && mComplete;
 }
 
 bool
 ServoStyleSheet::HasRules() const
 {
-  return Servo_StyleSheet_HasRules(RawSheet());
+  return mSheet && Servo_StyleSheet_HasRules(mSheet);
 }
 
 nsIDocument*
 ServoStyleSheet::GetOwningDocument() const
 {
   return mDocument;
 }
 
--- a/layout/style/StyleSheetHandleInlines.h
+++ b/layout/style/StyleSheetHandleInlines.h
@@ -166,16 +166,17 @@ StyleSheetHandle::Ptr::SizeOfIncludingTh
 void
 StyleSheetHandle::Ptr::List(FILE* aOut, int32_t aIndex) const
 {
   FORWARD(List, (aOut, aIndex));
 }
 #endif
 
 #undef FORWARD
+#undef FORWARD_CONCRETE
 
 inline void
 ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,
                             StyleSheetHandle& aField,
                             const char* aName,
                             uint32_t aFlags = 0)
 {
   if (aField && aField->IsGecko()) {