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

Unified Diff: third_party/WebKit/Source/core/dom/Text.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/dom/Text.cpp
diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp
index c9b0047b4d1353186acf0398f615d563b7b7b0e0..09e391a059a668ae763dc4a898fe20c2b6676a55 100644
--- a/third_party/WebKit/Source/core/dom/Text.cpp
+++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -175,8 +175,8 @@ String Text::wholeText() const {
if (!n->IsTextNode())
continue;
const String& data = ToText(n)->data();
- if (std::numeric_limits<unsigned>::max() - data.length() < result_length)
- IMMEDIATE_CRASH();
+ CHECK_GE(std::numeric_limits<unsigned>::max() - data.length(),
+ result_length);
result_length += data.length();
}
StringBuilder result;
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698