Make GetChannel nicer in HTML5 parser

This commit is contained in:
Henri Sivonen 2009-06-24 10:22:51 +03:00
parent ad44605576
commit c27c098156

View File

@ -273,11 +273,8 @@ nsHtml5Parser::SetParserFilter(nsIParserFilter* aFilter)
NS_IMETHODIMP
nsHtml5Parser::GetChannel(nsIChannel** aChannel)
{
nsresult result = NS_ERROR_NOT_AVAILABLE;
if (mRequest) {
result = CallQueryInterface(mRequest, aChannel);
}
return result;
return mRequest ? CallQueryInterface(mRequest, aChannel) :
NS_ERROR_NOT_AVAILABLE;
}
NS_IMETHODIMP