Bug 923251 - Part c: Make nsCSSStyleSheet::AppendAllChildSheets return void; r=heycam

This commit is contained in:
Ms2ger 2013-11-11 08:59:58 +01:00
parent eafd14c859
commit 63ed46994e
3 changed files with 5 additions and 11 deletions

View File

@ -1528,16 +1528,13 @@ nsCSSStyleSheet::EnsureUniqueInner()
return eUniqueInner_ClonedInner;
}
bool
void
nsCSSStyleSheet::AppendAllChildSheets(nsTArray<nsCSSStyleSheet*>& aArray)
{
for (nsCSSStyleSheet* child = mInner->mFirstChild; child;
child = child->mNext) {
if (!aArray.AppendElement(child)) {
return false;
}
aArray.AppendElement(child);
}
return true;
}
already_AddRefed<nsCSSStyleSheet>

View File

@ -225,9 +225,8 @@ public:
};
EnsureUniqueInnerResult EnsureUniqueInner();
// Append all of this sheet's child sheets to aArray. Return true
// on success and false on allocation failure.
bool AppendAllChildSheets(nsTArray<nsCSSStyleSheet*>& aArray);
// Append all of this sheet's child sheets to aArray.
void AppendAllChildSheets(nsTArray<nsCSSStyleSheet*>& aArray);
bool UseForPresentation(nsPresContext* aPresContext,
nsMediaQueryResultCacheKey& aKey) const;

View File

@ -2026,9 +2026,7 @@ nsStyleSet::EnsureUniqueInnerOnCSSSheets()
}
// Enqueue all the sheet's children.
if (!sheet->AppendAllChildSheets(queue)) {
return nsCSSStyleSheet::eUniqueInner_CloneFailed;
}
sheet->AppendAllChildSheets(queue);
}
return res;
}