diff --git a/htmlparser/src/nsIParser.h b/htmlparser/src/nsIParser.h
index e9797f6a4b72..485c590e7ed7 100644
--- a/htmlparser/src/nsIParser.h
+++ b/htmlparser/src/nsIParser.h
@@ -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;
diff --git a/htmlparser/src/nsParser.cpp b/htmlparser/src/nsParser.cpp
index e272ee44d33c..0339282c0cf3 100644
--- a/htmlparser/src/nsParser.cpp
+++ b/htmlparser/src/nsParser.cpp
@@ -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
diff --git a/htmlparser/src/nsParser.h b/htmlparser/src/nsParser.h
index 98ca88e9a02a..f82e03af768f 100644
--- a/htmlparser/src/nsParser.h
+++ b/htmlparser/src/nsParser.h
@@ -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);
/**
diff --git a/parser/htmlparser/src/nsIParser.h b/parser/htmlparser/src/nsIParser.h
index e9797f6a4b72..485c590e7ed7 100644
--- a/parser/htmlparser/src/nsIParser.h
+++ b/parser/htmlparser/src/nsIParser.h
@@ -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;
diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp
index e272ee44d33c..0339282c0cf3 100644
--- a/parser/htmlparser/src/nsParser.cpp
+++ b/parser/htmlparser/src/nsParser.cpp
@@ -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
diff --git a/parser/htmlparser/src/nsParser.h b/parser/htmlparser/src/nsParser.h
index 98ca88e9a02a..f82e03af768f 100644
--- a/parser/htmlparser/src/nsParser.h
+++ b/parser/htmlparser/src/nsParser.h
@@ -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);
/**