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

Unified Diff: third_party/WebKit/Source/core/editing/PlainTextRange.cpp

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. Created 4 years, 8 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/editing/PlainTextRange.cpp
diff --git a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
index 7cfb84d3ba034f28437dd9c0c45e3f34382c3cb6..163d3e7ac405d0b31775305476d0715d288c4835 100644
--- a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
+++ b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
@@ -46,16 +46,16 @@ PlainTextRange::PlainTextRange(int location)
: m_start(location)
, m_end(location)
{
- ASSERT(location >= 0);
+ DCHECK_GE(location, 0);
}
PlainTextRange::PlainTextRange(int start, int end)
: m_start(start)
, m_end(end)
{
- ASSERT(start >= 0);
- ASSERT(end >= 0);
- ASSERT(start <= end);
+ DCHECK_GE(start, 0);
+ DCHECK_GE(end, 0);
+ DCHECK_LE(start, end);
}
EphemeralRange PlainTextRange::createRange(const ContainerNode& scope) const
@@ -70,7 +70,7 @@ EphemeralRange PlainTextRange::createRangeForSelection(const ContainerNode& scop
EphemeralRange PlainTextRange::createRangeFor(const ContainerNode& scope, GetRangeFor getRangeFor) const
{
- ASSERT(isNotNull());
+ DCHECK(isNotNull());
size_t docTextPosition = 0;
bool startRangeFound = false;

Powered by Google App Engine
This is Rietveld 408576698