Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
index 3e41a97154a7da153b035b1baef581fdf5febb0f..b9c76dd76e404045ad5b0494f5744decc2458f72 100644 |
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
@@ -1544,11 +1544,8 @@ |
if (m_responseTypeCode == ResponseTypeJSON) |
return TextResourceDecoder::create("application/json", "UTF-8"); |
- if (!m_finalResponseCharset.isEmpty()) { |
- OwnPtr<TextResourceDecoder> decoder(TextResourceDecoder::create("text/plain")); |
- decoder->setEncoding(WTF::TextEncoding(m_finalResponseCharset), TextResourceDecoder::EncodingFromHTTPHeader); |
- return decoder.release(); |
- } |
+ if (!m_finalResponseCharset.isEmpty()) |
+ return TextResourceDecoder::create("text/plain", m_finalResponseCharset); |
// allow TextResourceDecoder to look inside the m_response if it's XML or HTML |
if (responseIsXML()) { |