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

Unified Diff: third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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/wtf/text/TextCodecUTF16.cpp
diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
index 8fcb4f49300a9b513ab02459d9e5c8608e131a2a..72b187df06248d6de5d10f036542f6156153845d 100644
--- a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
+++ b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
@@ -160,7 +160,7 @@ CString TextCodecUTF16::encode(const UChar* characters,
// the buffer doesn't occupy the entire address space, we can
// assert here that doubling the length does not overflow size_t
// and there's no need for a runtime check.
- ASSERT(length <= numeric_limits<size_t>::max() / 2);
+ DCHECK_LE(length, numeric_limits<size_t>::max() / 2);
char* bytes;
CString result = CString::createUninitialized(length * 2, bytes);
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecICU.cpp ('k') | third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698