Index: Source/core/html/parser/BackgroundHTMLParser.cpp |
diff --git a/Source/core/html/parser/BackgroundHTMLParser.cpp b/Source/core/html/parser/BackgroundHTMLParser.cpp |
index 77d11543259836602909d8da77ebeed03c3d073e..e169e6d2f2ac2ab5a026f29a2c0ebed942e2b704 100644 |
--- a/Source/core/html/parser/BackgroundHTMLParser.cpp |
+++ b/Source/core/html/parser/BackgroundHTMLParser.cpp |
@@ -27,7 +27,6 @@ |
#include "core/html/parser/BackgroundHTMLParser.h" |
#include "core/html/parser/HTMLDocumentParser.h" |
-#include "core/html/parser/HTMLParserThread.h" |
#include "core/html/parser/TextResourceDecoder.h" |
#include "core/html/parser/XSSAuditor.h" |
#include "wtf/MainThread.h" |
@@ -101,6 +100,12 @@ BackgroundHTMLParser::~BackgroundHTMLParser() |
{ |
} |
+void BackgroundHTMLParser::acceptData(const char* data, int dataLength) |
+{ |
+ ASSERT(m_decoder); |
+ updateDocument(m_decoder->decode(data, dataLength)); |
+} |
+ |
void BackgroundHTMLParser::append(const String& input) |
{ |
ASSERT(!m_input.current().isClosed()); |
@@ -110,16 +115,19 @@ void BackgroundHTMLParser::append(const String& input) |
void BackgroundHTMLParser::appendBytes(PassOwnPtr<Vector<char> > buffer) |
{ |
+ ASSERT(m_decoder); |
updateDocument(m_decoder->decode(buffer->data(), buffer->size())); |
} |
void BackgroundHTMLParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) |
{ |
+ ASSERT(decoder); |
m_decoder = decoder; |
} |
void BackgroundHTMLParser::flush() |
{ |
+ ASSERT(m_decoder); |
updateDocument(m_decoder->flush()); |
} |