Bug 1304302 part 2 - Some small fixes. r=heycam

MozReview-Commit-ID: 7rnl4wkMorC
This commit is contained in:
Xidorn Quan
2016-09-26 22:03:25 +10:00
parent 51c2a1c391
commit bb435b8c71
3 changed files with 3 additions and 2 deletions

View File

@@ -1121,7 +1121,7 @@ Loader::CreateSheet(nsIURI* aURI,
// Then our per-document complete sheets. // Then our per-document complete sheets.
URIPrincipalReferrerPolicyAndCORSModeHashKey key(aURI, aLoaderPrincipal, aCORSMode, aReferrerPolicy); URIPrincipalReferrerPolicyAndCORSModeHashKey key(aURI, aLoaderPrincipal, aCORSMode, aReferrerPolicy);
StyleSheetHandle completeSheet; StyleSheetHandle completeSheet = nullptr;
mSheets->mCompleteSheets.Get(&key, &completeSheet); mSheets->mCompleteSheets.Get(&key, &completeSheet);
sheet = completeSheet; sheet = completeSheet;
LOG((" From completed: %p", sheet->AsVoidPtr())); LOG((" From completed: %p", sheet->AsVoidPtr()));

View File

@@ -32,7 +32,7 @@ ServoStyleSheet::IsApplicable() const
bool bool
ServoStyleSheet::HasRules() const ServoStyleSheet::HasRules() const
{ {
return Servo_StyleSheet_HasRules(RawSheet()); return mSheet && Servo_StyleSheet_HasRules(mSheet);
} }
nsIDocument* nsIDocument*

View File

@@ -171,6 +171,7 @@ StyleSheetHandle::Ptr::List(FILE* aOut, int32_t aIndex) const
#endif #endif
#undef FORWARD #undef FORWARD
#undef FORWARD_CONCRETE
inline void inline void
ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback, ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,