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

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: 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/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..fda1d1957aacd6b4a94255d4b833a6f062cfbbb6 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()) << m_insertChild;
+ DCHECK(m_refChild);
+ DCHECK(m_refChild->parentNode()) << m_refChild;
- ASSERT(m_refChild->parentNode()->hasEditableStyle() || !m_refChild->parentNode()->inActiveDocument());
+ DCHECK(m_refChild->parentNode()->hasEditableStyle() || !m_refChild->parentNode()->inActiveDocument()) << 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)) << parent;
parent->insertBefore(m_insertChild.get(), m_refChild.get(), IGNORE_EXCEPTION);
}

Powered by Google App Engine
This is Rietveld 408576698