Chromium Code Reviews| 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; |
| } |