Bug 1032118 - Remove the nsresult return value from nsMediaList::SetStyleSheet; r=dbaron

It is never checked, and only ever returns NS_OK.
This commit is contained in:
Ms2ger 2014-07-02 12:53:41 +02:00
parent ce5ab085ef
commit 57a400eb87
2 changed files with 2 additions and 3 deletions

View File

@ -543,13 +543,12 @@ nsMediaList::Matches(nsPresContext* aPresContext,
return mArray.IsEmpty();
}
nsresult
void
nsMediaList::SetStyleSheet(CSSStyleSheet* aSheet)
{
NS_ASSERTION(aSheet == mStyleSheet || !aSheet || !mStyleSheet,
"multiple style sheets competing for one media list");
mStyleSheet = aSheet;
return NS_OK;
}
already_AddRefed<nsMediaList>

View File

@ -176,7 +176,7 @@ public:
bool Matches(nsPresContext* aPresContext,
nsMediaQueryResultCacheKey* aKey);
nsresult SetStyleSheet(mozilla::CSSStyleSheet* aSheet);
void SetStyleSheet(mozilla::CSSStyleSheet* aSheet);
void AppendQuery(nsAutoPtr<nsMediaQuery>& aQuery) {
// Takes ownership of aQuery
mArray.AppendElement(aQuery.forget());