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

Unified Diff: third_party/WebKit/Source/platform/wtf/text/StringImpl.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/platform/wtf/text/StringImpl.cpp
diff --git a/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp b/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp
index 10def1fa263122811298a84a9ecaad5c90fbb722..aeba8335c32bbaf24036c48b376323b2f8601154 100644
--- a/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp
+++ b/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp
@@ -650,8 +650,7 @@ PassRefPtr<StringImpl> StringImpl::LowerUnicode(
else
return LowerUnicode();
- if (length_ > static_cast<unsigned>(numeric_limits<int32_t>::max()))
- IMMEDIATE_CRASH();
+ CHECK_LE(length_, static_cast<unsigned>(numeric_limits<int32_t>::max()));
int length = length_;
RefPtr<StringImpl> upconverted = UpconvertedString();
@@ -676,8 +675,7 @@ PassRefPtr<StringImpl> StringImpl::UpperUnicode(
else
return UpperUnicode();
- if (length_ > static_cast<unsigned>(numeric_limits<int32_t>::max()))
- IMMEDIATE_CRASH();
+ CHECK_LE(length_, static_cast<unsigned>(numeric_limits<int32_t>::max()));
int length = length_;
RefPtr<StringImpl> upconverted = UpconvertedString();

Powered by Google App Engine
This is Rietveld 408576698