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/dom/DocumentLifecycle.cpp

Issue 1826733002: Remove ASSERT_WITH_MESSAGE family. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/DocumentLifecycle.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
index 5e9e11c7bdf9c8dbfd5f116d04963ba18d66f48c..f15e411b2d3676a0773bd915ba9683b2080df503 100644
--- a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
@@ -266,8 +266,11 @@ bool DocumentLifecycle::canRewindTo(LifecycleState nextState) const
void DocumentLifecycle::advanceTo(LifecycleState nextState)
{
- ASSERT_WITH_MESSAGE(canAdvanceTo(nextState),
- "Cannot advance document lifecycle from %s to %s.", stateAsDebugString(m_state), stateAsDebugString(nextState));
+#if DCHECK_IS_ON()
haraken 2016/03/23 02:10:01 I'm just curious but do you know why DCHECK is not
tkent 2016/03/23 02:20:51 DCHECK is no-op and I think compilers generate no
+ DCHECK(canAdvanceTo(nextState))
+ << "Cannot advance document lifecycle from " << stateAsDebugString(m_state)
+ << " to " << stateAsDebugString(nextState) << ".";
+#endif
m_state = nextState;
}
@@ -276,8 +279,11 @@ void DocumentLifecycle::ensureStateAtMost(LifecycleState state)
ASSERT(state == VisualUpdatePending || state == StyleClean || state == LayoutClean);
if (m_state <= state)
return;
- ASSERT_WITH_MESSAGE(canRewindTo(state),
- "Cannot rewind document lifecycle from %s to %s.", stateAsDebugString(m_state), stateAsDebugString(state));
+#if DCHECK_IS_ON()
+ DCHECK(canRewindTo(state))
+ << "Cannot rewind document lifecycle from " << stateAsDebugString(m_state)
+ << " to " <<stateAsDebugString(state) << ".";
+#endif
m_state = state;
}

Powered by Google App Engine
This is Rietveld 408576698