Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Unified Diff: third_party/libxml/src/parser.c

Issue 7886003: Revert 100883 - Desist libxml from continuing the parse after a SAX callback has stopped the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxml/src/parser.c
===================================================================
--- third_party/libxml/src/parser.c (revision 100883)
+++ third_party/libxml/src/parser.c (working copy)
@@ -4827,8 +4827,7 @@
(ctxt->sax->processingInstruction != NULL))
ctxt->sax->processingInstruction(ctxt->userData,
target, NULL);
- if (ctxt->instate != XML_PARSER_EOF)
- ctxt->instate = state;
+ ctxt->instate = state;
return;
}
buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
@@ -4908,8 +4907,7 @@
} else {
xmlFatalErr(ctxt, XML_ERR_PI_NOT_STARTED, NULL);
}
- if (ctxt->instate != XML_PARSER_EOF)
- ctxt->instate = state;
+ ctxt->instate = state;
}
}
@@ -9468,8 +9466,6 @@
else
name = xmlParseStartTag(ctxt);
#endif /* LIBXML_SAX1_ENABLED */
- if (ctxt->instate == XML_PARSER_EOF)
- return;
if (name == NULL) {
spacePop(ctxt);
return;
@@ -10849,8 +10845,6 @@
else
name = xmlParseStartTag(ctxt);
#endif /* LIBXML_SAX1_ENABLED */
- if (ctxt->instate == XML_PARSER_EOF)
- return;
if (name == NULL) {
spacePop(ctxt);
ctxt->instate = XML_PARSER_EOF;
@@ -11037,9 +11031,7 @@
else
xmlParseEndTag1(ctxt, 0);
#endif /* LIBXML_SAX1_ENABLED */
- if (ctxt->instate == XML_PARSER_EOF) {
- /* Nothing */
- } else if (ctxt->nameNr == 0) {
+ if (ctxt->nameNr == 0) {
ctxt->instate = XML_PARSER_EPILOG;
} else {
ctxt->instate = XML_PARSER_CONTENT;
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698