| 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.
|
|
|