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/core/editing/commands/InsertNodeBeforeCommand.cpp

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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/InsertNodeBeforeCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp
index 387068871a46f54c534c638dc2880a34a67f3fd1..86502b890da0e7142b9a5b5c5e45686d30336d39 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertNodeBeforeCommand.cpp
@@ -36,12 +36,12 @@ InsertNodeBeforeCommand::InsertNodeBeforeCommand(Node* insertChild, Node* refChi
, m_refChild(refChild)
, m_shouldAssumeContentIsAlwaysEditable(shouldAssumeContentIsAlwaysEditable)
{
- ASSERT(m_insertChild);
- ASSERT(!m_insertChild->parentNode());
- ASSERT(m_refChild);
- ASSERT(m_refChild->parentNode());
+ DCHECK(m_insertChild);
+ DCHECK(!m_insertChild->parentNode());
yosin_UTC9 2016/04/14 04:35:02 How about adding |<< m_insertChild|?
+ DCHECK(m_refChild);
+ DCHECK(m_refChild->parentNode());
yosin_UTC9 2016/04/14 04:35:02 How about adding |<< m_refChild|?
- ASSERT(m_refChild->parentNode()->hasEditableStyle() || !m_refChild->parentNode()->inActiveDocument());
+ DCHECK(m_refChild->parentNode()->hasEditableStyle() || !m_refChild->parentNode()->inActiveDocument());
yosin_UTC9 2016/04/14 04:35:02 How about adding |<< m_refChild->parentNode()|?
}
void InsertNodeBeforeCommand::doApply(EditingState*)
@@ -49,7 +49,7 @@ void InsertNodeBeforeCommand::doApply(EditingState*)
ContainerNode* parent = m_refChild->parentNode();
if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable && !parent->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable)))
return;
- ASSERT(parent->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable));
+ DCHECK(parent->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable));
yosin_UTC9 2016/04/14 04:35:02 How about adding |<< parent|?
parent->insertBefore(m_insertChild.get(), m_refChild.get(), IGNORE_EXCEPTION);
}

Powered by Google App Engine
This is Rietveld 408576698