mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 697494 - Outparamdel nsIParser::GetStreamListener; r=hsivonen
This commit is contained in:
parent
1c189b4cf4
commit
1049c156c8
@ -950,10 +950,8 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
|
||||
// Set the parser as the stream listener for the document loader...
|
||||
if (mParser) {
|
||||
rv = mParser->GetStreamListener(aDocListener);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
nsCOMPtr<nsIStreamListener> listener = mParser->GetStreamListener();
|
||||
listener.forget(aDocListener);
|
||||
|
||||
#ifdef DEBUG_charset
|
||||
printf(" charset = %s source %d\n",
|
||||
|
@ -177,11 +177,10 @@ nsHtml5Parser::GetDTD(nsIDTD** aDTD)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHtml5Parser::GetStreamListener(nsIStreamListener** aListener)
|
||||
nsIStreamListener*
|
||||
nsHtml5Parser::GetStreamListener()
|
||||
{
|
||||
NS_IF_ADDREF(*aListener = mStreamParser);
|
||||
return NS_OK;
|
||||
return mStreamParser;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -137,7 +137,7 @@ class nsHtml5Parser : public nsIParser,
|
||||
/**
|
||||
* Get the stream parser for this parser
|
||||
*/
|
||||
NS_IMETHOD GetStreamListener(nsIStreamListener** aListener);
|
||||
virtual nsIStreamListener* GetStreamListener();
|
||||
|
||||
/**
|
||||
* Don't call. For interface compat only.
|
||||
|
@ -55,8 +55,8 @@
|
||||
#include "nsIAtom.h"
|
||||
|
||||
#define NS_IPARSER_IID \
|
||||
{ 0xcbc0cbd8, 0xbbb7, 0x46d6, \
|
||||
{ 0xa5, 0x51, 0x37, 0x8a, 0x69, 0x53, 0xa7, 0x14 } }
|
||||
{ 0xc9169398, 0x897a, 0x481d, \
|
||||
{ 0xa9, 0x5f, 0xd6, 0x60, 0x6e, 0xf8, 0x37, 0x56 } }
|
||||
|
||||
// {41421C60-310A-11d4-816F-000064657374}
|
||||
#define NS_IDEBUG_DUMP_CONTENT_IID \
|
||||
@ -196,10 +196,8 @@ class nsIParser : public nsISupports {
|
||||
|
||||
/**
|
||||
* Get the nsIStreamListener for this parser
|
||||
* @param aDTD out param that will contain the result
|
||||
* @return NS_OK if successful
|
||||
*/
|
||||
NS_IMETHOD GetStreamListener(nsIStreamListener** aListener) = 0;
|
||||
virtual nsIStreamListener* GetStreamListener() = 0;
|
||||
|
||||
/**************************************************************************
|
||||
* Parse methods always begin with an input source, and perform
|
||||
|
@ -2976,9 +2976,8 @@ nsParser::GetDTD(nsIDTD** aDTD)
|
||||
/**
|
||||
* Get this as nsIStreamListener
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsParser::GetStreamListener(nsIStreamListener** aListener)
|
||||
nsIStreamListener*
|
||||
nsParser::GetStreamListener()
|
||||
{
|
||||
NS_ADDREF(*aListener = this);
|
||||
return NS_OK;
|
||||
return this;
|
||||
}
|
||||
|
@ -294,10 +294,8 @@ class nsParser : public nsIParser,
|
||||
|
||||
/**
|
||||
* Get the nsIStreamListener for this parser
|
||||
* @param aDTD out param that will contain the result
|
||||
* @return NS_OK if successful
|
||||
*/
|
||||
NS_IMETHOD GetStreamListener(nsIStreamListener** aListener);
|
||||
virtual nsIStreamListener* GetStreamListener();
|
||||
|
||||
/**
|
||||
* Detects the existence of a META tag with charset information in
|
||||
|
Loading…
Reference in New Issue
Block a user