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

Unified Diff: third_party/WebKit/Source/wtf/text/ASCIIFastPath.h

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/ASCIIFastPath.h
diff --git a/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h b/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h
index 37685e349f173a706ea992ea676420ccd1e45d3c..b167a322152ad1d9d313d89c78c5377b19759674 100644
--- a/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h
+++ b/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h
@@ -116,7 +116,7 @@ inline void copyLCharsFromUCharSource(LChar* destination,
size_t i = 0;
for (; i < length && !isAlignedTo<memoryAccessMask>(&source[i]); ++i) {
- ASSERT(!(source[i] & 0xff00));
+ DCHECK(!(source[i] & 0xff00));
destination[i] = static_cast<LChar>(source[i]);
}
@@ -126,9 +126,9 @@ inline void copyLCharsFromUCharSource(LChar* destination,
if (length > ucharsPerLoop) {
const size_t endLength = length - ucharsPerLoop + 1;
for (; i < endLength; i += ucharsPerLoop) {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
for (unsigned checkIndex = 0; checkIndex < ucharsPerLoop; ++checkIndex)
- ASSERT(!(source[i + checkIndex] & 0xff00));
+ DCHECK(!(source[i + checkIndex] & 0xff00));
#endif
__m128i first8UChars =
_mm_load_si128(reinterpret_cast<const __m128i*>(&source[i]));
@@ -141,7 +141,7 @@ inline void copyLCharsFromUCharSource(LChar* destination,
}
for (; i < length; ++i) {
- ASSERT(!(source[i] & 0xff00));
+ DCHECK(!(source[i] & 0xff00));
destination[i] = static_cast<LChar>(source[i]);
}
#elif COMPILER(GCC) && CPU(ARM_NEON) && \
@@ -171,7 +171,7 @@ inline void copyLCharsFromUCharSource(LChar* destination,
*destination++ = static_cast<LChar>(*source++);
#else
for (size_t i = 0; i < length; ++i) {
- ASSERT(!(source[i] & 0xff00));
+ DCHECK(!(source[i] & 0xff00));
destination[i] = static_cast<LChar>(source[i]);
}
#endif
« no previous file with comments | « third_party/WebKit/Source/wtf/dtoa/utils.h ('k') | third_party/WebKit/Source/wtf/text/IntegerToStringConversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698