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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 2919653004: Use LOG() or LOG_IF() instead of IMMEDIATE_CRASH (Closed)
Patch Set: Use LOG() or CHECK()|CHECK_FOO() instead of IMMEDIATE_CRASH Created 3 years, 6 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/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index 8753bc158fe62257cb037b77494acbbdc843f128..80f0ce2b8b746a18a832f6885cb67581a420a980 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -109,9 +109,7 @@ static void MakeCapitalized(String* string, UChar previous) {
unsigned length = string->length();
const StringImpl& input = *string->Impl();
- if (length >= std::numeric_limits<unsigned>::max())
- IMMEDIATE_CRASH();
-
+ CHECK_LT(length, std::numeric_limits<unsigned>::max());
StringBuffer<UChar> string_with_previous(length + 1);
string_with_previous[0] =
previous == kNoBreakSpaceCharacter ? kSpaceCharacter : previous;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.h ('k') | third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698