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

Side by Side Diff: Source/core/fetch/TextResourceDecoder.cpp

Issue 74513003: Moved text decoding to the parser thread (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_step25
Patch Set: Review fixes Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserved. 3 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserved.
4 Copyright (C) 2005, 2006, 2007 Alexey Proskuryakov (ap@nypop.com) 4 Copyright (C) 2005, 2006, 2007 Alexey Proskuryakov (ap@nypop.com)
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 if (!m_codec) 428 if (!m_codec)
429 m_codec = newTextCodec(m_encoding); 429 m_codec = newTextCodec(m_encoding);
430 430
431 String result = m_codec->decode(m_buffer.data(), m_buffer.size(), true, m_co ntentType == XML && !m_useLenientXMLDecoding, m_sawError); 431 String result = m_codec->decode(m_buffer.data(), m_buffer.size(), true, m_co ntentType == XML && !m_useLenientXMLDecoding, m_sawError);
432 m_buffer.clear(); 432 m_buffer.clear();
433 m_codec.clear(); 433 m_codec.clear();
434 m_checkedForBOM = false; // Skip BOM again when re-decoding. 434 m_checkedForBOM = false; // Skip BOM again when re-decoding.
435 return result; 435 return result;
436 } 436 }
437 437
438 void TextResourceDecoder::getEncodingData(DocumentEncodingData& encodingData) co nst
439 {
440 encodingData.encoding = m_encoding;
441 encodingData.wasDetectedHeuristically = encodingWasDetectedHeuristically();
442 encodingData.sawDecodingError = m_sawError;
438 } 443 }
444
445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698