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

Unified Diff: Source/core/html/parser/TextResourceDecoder.cpp

Issue 23532016: Handle odd data lengths in UTF-16 decoder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify Created 6 years, 10 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 | « Source/core/dom/Document.cpp ('k') | Source/modules/encoding/TextDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/TextResourceDecoder.cpp
diff --git a/Source/core/html/parser/TextResourceDecoder.cpp b/Source/core/html/parser/TextResourceDecoder.cpp
index 1f650d4b5a4a6eba88a722b943c6ce6d529e39fb..3daddfedb413d5f0d67bb83ca336ece74ad782c3 100644
--- a/Source/core/html/parser/TextResourceDecoder.cpp
+++ b/Source/core/html/parser/TextResourceDecoder.cpp
@@ -406,7 +406,7 @@ String TextResourceDecoder::decode(const char* data, size_t len)
if (!m_codec)
m_codec = newTextCodec(m_encoding);
- String result = m_codec->decode(dataForDecode, lengthForDecode, false, m_contentType == XMLContent && !m_useLenientXMLDecoding, m_sawError);
+ String result = m_codec->decode(dataForDecode, lengthForDecode, DoNotFlush, m_contentType == XMLContent && !m_useLenientXMLDecoding, m_sawError);
m_buffer.clear();
return result;
@@ -427,7 +427,7 @@ String TextResourceDecoder::flush()
if (!m_codec)
m_codec = newTextCodec(m_encoding);
- String result = m_codec->decode(m_buffer.data(), m_buffer.size(), true, m_contentType == XMLContent && !m_useLenientXMLDecoding, m_sawError);
+ String result = m_codec->decode(m_buffer.data(), m_buffer.size(), FetchEOF, m_contentType == XMLContent && !m_useLenientXMLDecoding, m_sawError);
m_buffer.clear();
m_codec.clear();
m_checkedForBOM = false; // Skip BOM again when re-decoding.
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/modules/encoding/TextDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698