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

Unified Diff: third_party/WebKit/Source/core/editing/commands/DeleteFromTextNodeCommand.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/commands/DeleteFromTextNodeCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteFromTextNodeCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteFromTextNodeCommand.cpp
index e3576d69f8eb423b06e73260fa88b8a47178ba29..712740f04bdad1271a0a19689c377a5478c4773d 100644
--- a/third_party/WebKit/Source/core/editing/commands/DeleteFromTextNodeCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/DeleteFromTextNodeCommand.cpp
@@ -37,14 +37,14 @@ DeleteFromTextNodeCommand::DeleteFromTextNodeCommand(Text* node, unsigned offset
, m_offset(offset)
, m_count(count)
{
- ASSERT(m_node);
- ASSERT(m_offset <= m_node->length());
- ASSERT(m_offset + m_count <= m_node->length());
+ DCHECK(m_node);
+ DCHECK_LE(m_offset, m_node->length());
+ DCHECK_LE(m_offset + m_count, m_node->length());
}
void DeleteFromTextNodeCommand::doApply(EditingState*)
{
- ASSERT(m_node);
+ DCHECK(m_node);
if (!m_node->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable))
return;
@@ -59,7 +59,7 @@ void DeleteFromTextNodeCommand::doApply(EditingState*)
void DeleteFromTextNodeCommand::doUnapply()
{
- ASSERT(m_node);
+ DCHECK(m_node);
if (!m_node->hasEditableStyle())
return;

Powered by Google App Engine
This is Rietveld 408576698