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

Unified Diff: Source/core/dom/DecodedDataDocumentParser.cpp

Issue 27394002: Process decoded bytes when in stopped (but not detached) state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename test, add comment Created 7 years, 2 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
Index: Source/core/dom/DecodedDataDocumentParser.cpp
diff --git a/Source/core/dom/DecodedDataDocumentParser.cpp b/Source/core/dom/DecodedDataDocumentParser.cpp
index 7ac890e48e1c4993dd7b01576d1c927909a315b8..c7345802679b21dac20c0f7e65112e52d94d6bf5 100644
--- a/Source/core/dom/DecodedDataDocumentParser.cpp
+++ b/Source/core/dom/DecodedDataDocumentParser.cpp
@@ -41,7 +41,10 @@ size_t DecodedDataDocumentParser::appendBytes(const char* data, size_t length)
if (!length)
return 0;
- if (isStopped())
+ // This should be checking isStopped(), but XMLDocumentParser prematurely
+ // stops parsing when handling an XSLT processing instruction and still
+ // needs to receive decoded bytes.
+ if (isDetached())
return 0;
String decoded = document()->decoder()->decode(data, length);
@@ -58,7 +61,10 @@ size_t DecodedDataDocumentParser::appendBytes(const char* data, size_t length)
size_t DecodedDataDocumentParser::flush()
{
- if (isStopped())
+ // This should be checking isStopped(), but XMLDocumentParser prematurely
+ // stops parsing when handling an XSLT processing instruction and still
+ // needs to receive decoded bytes.
+ if (isDetached())
return 0;
// null decoder indicates there is no data received.
« no previous file with comments | « LayoutTests/http/tests/incremental/resources/transform.xsl ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698