зеркало из https://github.com/mozilla/gecko-dev.git
Made EnableParse() to return nsresult. Used to return PRBool
This commit is contained in:
Родитель
9e9afeb293
Коммит
17608d0b57
|
@ -165,7 +165,7 @@ CLASS_EXPORT_HTMLPARS nsIParser : public nsISupports {
|
|||
* until you wind up being emitted to the given contentsink (which may or may not
|
||||
* be a proxy for the NGLayout content model).
|
||||
******************************************************************************************/
|
||||
virtual PRBool EnableParser(PRBool aState) = 0;
|
||||
virtual nsresult EnableParser(PRBool aState) = 0;
|
||||
virtual PRBool IsParserEnabled() = 0;
|
||||
virtual nsresult Parse(nsIURI* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE, void* aKey=0,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
virtual nsresult Parse(nsIInputStream& aStream, PRBool aEnableVerify=PR_FALSE, void* aKey=0,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
|
|
|
@ -600,7 +600,7 @@ nsresult nsParser::Terminate(void){
|
|||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
PRBool nsParser::EnableParser(PRBool aState){
|
||||
nsresult nsParser::EnableParser(PRBool aState){
|
||||
nsIParser* me = nsnull;
|
||||
|
||||
// If the stream has already finished, there's a good chance
|
||||
|
@ -624,7 +624,7 @@ PRBool nsParser::EnableParser(PRBool aState){
|
|||
// Release reference if we added one at the top of this routine
|
||||
NS_IF_RELEASE(me);
|
||||
|
||||
return aState;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -899,8 +899,7 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD, PRBool aIsFinalChunk) {
|
|||
// in) until the parser is enabled.
|
||||
//PRUint32 b1=NS_ERROR_HTMLPARSER_BLOCK;
|
||||
if(NS_ERROR_HTMLPARSER_BLOCK==result) {
|
||||
EnableParser(PR_FALSE);
|
||||
result=NS_OK;
|
||||
result=EnableParser(PR_FALSE);
|
||||
}
|
||||
}//if
|
||||
}//if
|
||||
|
|
|
@ -205,7 +205,7 @@ friend class CTokenHandler;
|
|||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
virtual PRBool EnableParser(PRBool aState);
|
||||
virtual nsresult EnableParser(PRBool aState);
|
||||
virtual nsresult Terminate(void);
|
||||
|
||||
/**
|
||||
|
|
|
@ -165,7 +165,7 @@ CLASS_EXPORT_HTMLPARS nsIParser : public nsISupports {
|
|||
* until you wind up being emitted to the given contentsink (which may or may not
|
||||
* be a proxy for the NGLayout content model).
|
||||
******************************************************************************************/
|
||||
virtual PRBool EnableParser(PRBool aState) = 0;
|
||||
virtual nsresult EnableParser(PRBool aState) = 0;
|
||||
virtual PRBool IsParserEnabled() = 0;
|
||||
virtual nsresult Parse(nsIURI* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE, void* aKey=0,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
virtual nsresult Parse(nsIInputStream& aStream, PRBool aEnableVerify=PR_FALSE, void* aKey=0,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
|
|
|
@ -600,7 +600,7 @@ nsresult nsParser::Terminate(void){
|
|||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
PRBool nsParser::EnableParser(PRBool aState){
|
||||
nsresult nsParser::EnableParser(PRBool aState){
|
||||
nsIParser* me = nsnull;
|
||||
|
||||
// If the stream has already finished, there's a good chance
|
||||
|
@ -624,7 +624,7 @@ PRBool nsParser::EnableParser(PRBool aState){
|
|||
// Release reference if we added one at the top of this routine
|
||||
NS_IF_RELEASE(me);
|
||||
|
||||
return aState;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -899,8 +899,7 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD, PRBool aIsFinalChunk) {
|
|||
// in) until the parser is enabled.
|
||||
//PRUint32 b1=NS_ERROR_HTMLPARSER_BLOCK;
|
||||
if(NS_ERROR_HTMLPARSER_BLOCK==result) {
|
||||
EnableParser(PR_FALSE);
|
||||
result=NS_OK;
|
||||
result=EnableParser(PR_FALSE);
|
||||
}
|
||||
}//if
|
||||
}//if
|
||||
|
|
|
@ -205,7 +205,7 @@ friend class CTokenHandler;
|
|||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
virtual PRBool EnableParser(PRBool aState);
|
||||
virtual nsresult EnableParser(PRBool aState);
|
||||
virtual nsresult Terminate(void);
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче