Bug 569181. nsCOMPtr<nsMediaList> should be nsRefPtr. r=dbaron

This commit is contained in:
Craig Topper 2010-06-01 11:50:10 +12:00
parent 736592869f
commit 2abf52364b
2 changed files with 3 additions and 3 deletions

View File

@ -1218,7 +1218,7 @@ Loader::PrepareSheet(nsCSSStyleSheet* aSheet,
NS_PRECONDITION(aSheet, "Must have a sheet!"); NS_PRECONDITION(aSheet, "Must have a sheet!");
nsresult rv; nsresult rv;
nsCOMPtr<nsMediaList> mediaList(aMediaList); nsRefPtr<nsMediaList> mediaList(aMediaList);
if (!aMediaString.IsEmpty()) { if (!aMediaString.IsEmpty()) {
NS_ASSERTION(!aMediaList, NS_ASSERTION(!aMediaList,

View File

@ -1899,7 +1899,7 @@ CSSParserImpl::ParseMediaQueryExpression(nsMediaQuery* aQuery)
PRBool PRBool
CSSParserImpl::ParseImportRule(RuleAppendFunc aAppendFunc, void* aData) CSSParserImpl::ParseImportRule(RuleAppendFunc aAppendFunc, void* aData)
{ {
nsCOMPtr<nsMediaList> media = new nsMediaList(); nsRefPtr<nsMediaList> media = new nsMediaList();
if (!media) { if (!media) {
mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY); mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY);
return PR_FALSE; return PR_FALSE;
@ -2015,7 +2015,7 @@ CSSParserImpl::ParseGroupRule(nsICSSGroupRule* aRule,
PRBool PRBool
CSSParserImpl::ParseMediaRule(RuleAppendFunc aAppendFunc, void* aData) CSSParserImpl::ParseMediaRule(RuleAppendFunc aAppendFunc, void* aData)
{ {
nsCOMPtr<nsMediaList> media = new nsMediaList(); nsRefPtr<nsMediaList> media = new nsMediaList();
if (!media) { if (!media) {
mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY); mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY);
return PR_FALSE; return PR_FALSE;