| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 #endif | 339 #endif |
| 340 m_state = nextState; | 340 m_state = nextState; |
| 341 } | 341 } |
| 342 | 342 |
| 343 void DocumentLifecycle::ensureStateAtMost(LifecycleState state) { | 343 void DocumentLifecycle::ensureStateAtMost(LifecycleState state) { |
| 344 DCHECK(state == VisualUpdatePending || state == StyleClean || | 344 DCHECK(state == VisualUpdatePending || state == StyleClean || |
| 345 state == LayoutClean); | 345 state == LayoutClean); |
| 346 if (m_state <= state) | 346 if (m_state <= state) |
| 347 return; | 347 return; |
| 348 #if DCHECK_IS_ON() | 348 #if DCHECK_IS_ON() |
| 349 DCHECK(canRewindTo(state)) << "Cannot rewind document lifecycle from " | 349 DCHECK(canRewindTo(state)) |
| 350 << stateAsDebugString(m_state) << " to " | 350 << "Cannot rewind document lifecycle from " << stateAsDebugString(m_state) |
| 351 << stateAsDebugString(state) << "."; | 351 << " to " << stateAsDebugString(state) << "."; |
| 352 #endif | 352 #endif |
| 353 m_state = state; | 353 m_state = state; |
| 354 } | 354 } |
| 355 | 355 |
| 356 bool DocumentLifecycle::throttlingAllowed() const { | 356 bool DocumentLifecycle::throttlingAllowed() const { |
| 357 return s_allowThrottlingCount; | 357 return s_allowThrottlingCount; |
| 358 } | 358 } |
| 359 | 359 |
| 360 } // namespace blink | 360 } // namespace blink |
| OLD | NEW |