зеркало из https://github.com/mozilla/pjs.git
Changed nsIContentSink->NotifyError() to accept an nsParserError argument. This change is needed for propagating errors from the new expat parser.
This commit is contained in:
Родитель
93bc8c37b3
Коммит
61aa27804d
|
@ -178,7 +178,7 @@ public:
|
|||
NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD CloseContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
|
||||
|
@ -3083,7 +3083,7 @@ HTMLContentSink::LoadStyleSheet(nsIURL* aURL,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLContentSink::NotifyError(nsresult aErrorResult)
|
||||
HTMLContentSink::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
// Errors in HTML? Who would have thought!
|
||||
// Why are you telling us, parser. Deal with it yourself.
|
||||
|
|
|
@ -720,9 +720,20 @@ nsXMLContentSink::AddLeaf(const nsIParserNode& aNode)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLContentSink::NotifyError(nsresult aErrorResult)
|
||||
{
|
||||
printf("nsXMLContentSink::NotifyError\n");
|
||||
nsXMLContentSink::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
nsString errorText("XML Parser Error: '");
|
||||
|
||||
if (aError) {
|
||||
errorText.Append(aError->description);
|
||||
errorText.Append("', Line: ");
|
||||
errorText.Append(aError->lineNumber, 10);
|
||||
errorText.Append(", Column: ");
|
||||
errorText.Append(aError->colNumber, 10);
|
||||
}
|
||||
|
||||
AddText(errorText);
|
||||
FlushText();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
|
||||
// nsIXMLContentSink
|
||||
NS_IMETHOD AddXMLDecl(const nsIParserNode& aNode);
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
|
||||
NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD CloseContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
NS_IMETHOD CloseTopmostContainer();
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
|
@ -249,7 +249,7 @@ NS_IMETHODIMP RobotSink::AddLeaf(const nsIParserNode& aNode)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP RobotSink::NotifyError(nsresult aErrorResult)
|
||||
NS_IMETHODIMP RobotSink::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ public:
|
|||
NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD CloseContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
|
||||
|
@ -3083,7 +3083,7 @@ HTMLContentSink::LoadStyleSheet(nsIURL* aURL,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLContentSink::NotifyError(nsresult aErrorResult)
|
||||
HTMLContentSink::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
// Errors in HTML? Who would have thought!
|
||||
// Why are you telling us, parser. Deal with it yourself.
|
||||
|
|
|
@ -720,9 +720,20 @@ nsXMLContentSink::AddLeaf(const nsIParserNode& aNode)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLContentSink::NotifyError(nsresult aErrorResult)
|
||||
{
|
||||
printf("nsXMLContentSink::NotifyError\n");
|
||||
nsXMLContentSink::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
nsString errorText("XML Parser Error: '");
|
||||
|
||||
if (aError) {
|
||||
errorText.Append(aError->description);
|
||||
errorText.Append("', Line: ");
|
||||
errorText.Append(aError->lineNumber, 10);
|
||||
errorText.Append(", Column: ");
|
||||
errorText.Append(aError->colNumber, 10);
|
||||
}
|
||||
|
||||
AddText(errorText);
|
||||
FlushText();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
|
||||
// nsIXMLContentSink
|
||||
NS_IMETHOD AddXMLDecl(const nsIParserNode& aNode);
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
|
||||
NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD CloseContainer(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
NS_IMETHOD CloseTopmostContainer();
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
|
@ -249,7 +249,7 @@ NS_IMETHODIMP RobotSink::AddLeaf(const nsIParserNode& aNode)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP RobotSink::NotifyError(nsresult aErrorResult)
|
||||
NS_IMETHODIMP RobotSink::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ public:
|
|||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
|
||||
// nsIXMLContentSink
|
||||
NS_IMETHOD AddXMLDecl(const nsIParserNode& aNode);
|
||||
|
@ -439,7 +439,7 @@ RDFContentSinkImpl::AddLeaf(const nsIParserNode& aNode)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RDFContentSinkImpl::NotifyError(nsresult aErrorResult)
|
||||
RDFContentSinkImpl::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
printf("RDFContentSinkImpl::NotifyError\n");
|
||||
return NS_OK;
|
||||
|
|
|
@ -131,7 +131,7 @@ public:
|
|||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
NS_IMETHOD NotifyError(nsresult aErrorResult);
|
||||
NS_IMETHOD NotifyError(const nsParserError* aError);
|
||||
|
||||
// nsIXMLContentSink
|
||||
NS_IMETHOD AddXMLDecl(const nsIParserNode& aNode);
|
||||
|
@ -530,7 +530,7 @@ XULContentSinkImpl::AddLeaf(const nsIParserNode& aNode)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XULContentSinkImpl::NotifyError(nsresult aErrorResult)
|
||||
XULContentSinkImpl::NotifyError(const nsParserError* aError)
|
||||
{
|
||||
printf("XULContentSinkImpl::NotifyError\n");
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче