| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 s_deprecatedTransitionStack = m_previous; | 65 s_deprecatedTransitionStack = m_previous; |
| 66 } | 66 } |
| 67 | 67 |
| 68 DocumentLifecycle::AllowThrottlingScope::AllowThrottlingScope(DocumentLifecycle&
lifecycle) | 68 DocumentLifecycle::AllowThrottlingScope::AllowThrottlingScope(DocumentLifecycle&
lifecycle) |
| 69 { | 69 { |
| 70 s_allowThrottlingCount++; | 70 s_allowThrottlingCount++; |
| 71 } | 71 } |
| 72 | 72 |
| 73 DocumentLifecycle::AllowThrottlingScope::~AllowThrottlingScope() | 73 DocumentLifecycle::AllowThrottlingScope::~AllowThrottlingScope() |
| 74 { | 74 { |
| 75 ASSERT(s_allowThrottlingCount > 0); | 75 DCHECK_GT(s_allowThrottlingCount, 0u); |
| 76 s_allowThrottlingCount--; | 76 s_allowThrottlingCount--; |
| 77 } | 77 } |
| 78 | 78 |
| 79 DocumentLifecycle::DocumentLifecycle() | 79 DocumentLifecycle::DocumentLifecycle() |
| 80 : m_state(Uninitialized) | 80 : m_state(Uninitialized) |
| 81 , m_detachCount(0) | 81 , m_detachCount(0) |
| 82 { | 82 { |
| 83 } | 83 } |
| 84 | 84 |
| 85 DocumentLifecycle::~DocumentLifecycle() | 85 DocumentLifecycle::~DocumentLifecycle() |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 #if DCHECK_IS_ON() | 269 #if DCHECK_IS_ON() |
| 270 DCHECK(canAdvanceTo(nextState)) | 270 DCHECK(canAdvanceTo(nextState)) |
| 271 << "Cannot advance document lifecycle from " << stateAsDebugString(m_sta
te) | 271 << "Cannot advance document lifecycle from " << stateAsDebugString(m_sta
te) |
| 272 << " to " << stateAsDebugString(nextState) << "."; | 272 << " to " << stateAsDebugString(nextState) << "."; |
| 273 #endif | 273 #endif |
| 274 m_state = nextState; | 274 m_state = nextState; |
| 275 } | 275 } |
| 276 | 276 |
| 277 void DocumentLifecycle::ensureStateAtMost(LifecycleState state) | 277 void DocumentLifecycle::ensureStateAtMost(LifecycleState state) |
| 278 { | 278 { |
| 279 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou
tClean); | 279 DCHECK(state == VisualUpdatePending || state == StyleClean || state == Layou
tClean); |
| 280 if (m_state <= state) | 280 if (m_state <= state) |
| 281 return; | 281 return; |
| 282 #if DCHECK_IS_ON() | 282 #if DCHECK_IS_ON() |
| 283 DCHECK(canRewindTo(state)) | 283 DCHECK(canRewindTo(state)) |
| 284 << "Cannot rewind document lifecycle from " << stateAsDebugString(m_stat
e) | 284 << "Cannot rewind document lifecycle from " << stateAsDebugString(m_stat
e) |
| 285 << " to " <<stateAsDebugString(state) << "."; | 285 << " to " <<stateAsDebugString(state) << "."; |
| 286 #endif | 286 #endif |
| 287 m_state = state; | 287 m_state = state; |
| 288 } | 288 } |
| 289 | 289 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 DEBUG_STRING_CASE(Stopped); | 322 DEBUG_STRING_CASE(Stopped); |
| 323 DEBUG_STRING_CASE(Disposed); | 323 DEBUG_STRING_CASE(Disposed); |
| 324 } | 324 } |
| 325 | 325 |
| 326 ASSERT_NOT_REACHED(); | 326 ASSERT_NOT_REACHED(); |
| 327 return "Unknown"; | 327 return "Unknown"; |
| 328 } | 328 } |
| 329 #endif | 329 #endif |
| 330 | 330 |
| 331 } // namespace blink | 331 } // namespace blink |
| OLD | NEW |