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

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

Issue 2751483005: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/html/parser/ (Closed)
Patch Set: rebase Created 3 years, 9 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
Index: third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp b/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
index cb7988314de486ef892a235155d204483e438f03..f71d434f81a8bbf8769ab05a36ed1bd8df942b07 100644
--- a/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp
@@ -157,7 +157,7 @@ TextResourceDecoder::TextResourceDecoder(
m_encodingDetectionOption(encodingDetectionOption) {
m_hintLanguage[0] = 0;
if (m_encodingDetectionOption == AlwaysUseUTF8ForText) {
- ASSERT(m_contentType == PlainTextContent && m_encoding == UTF8Encoding());
+ DCHECK(m_contentType == PlainTextContent && m_encoding == UTF8Encoding());
} else if (m_encodingDetectionOption == UseAllAutoDetection) {
// Checking empty URL helps unit testing. Providing defaultLanguage() is
// sometimes difficult in tests.
@@ -241,7 +241,7 @@ static int findXMLEncoding(const char* str, int len, int& encodingLength) {
size_t TextResourceDecoder::checkForBOM(const char* data, size_t len) {
// Check for UTF-16/32 or UTF-8 BOM mark at the beginning, which is a sure
// sign of a Unicode encoding. We let it override even a user-chosen encoding.
- ASSERT(!m_checkedForBOM);
+ DCHECK(!m_checkedForBOM);
size_t lengthOfBOM = 0;
@@ -477,7 +477,7 @@ String TextResourceDecoder::decode(const char* data, size_t len) {
setEncoding(detectedEncoding, EncodingFromContentSniffing);
}
- ASSERT(m_encoding.isValid());
+ DCHECK(m_encoding.isValid());
if (!m_codec)
m_codec = newTextCodec(m_encoding);

Powered by Google App Engine
This is Rietveld 408576698