Chromium Code Reviews| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 DocumentLifecycle& lifecycle) { | 74 DocumentLifecycle& lifecycle) { |
| 75 m_savedCount = s_allowThrottlingCount; | 75 m_savedCount = s_allowThrottlingCount; |
| 76 s_allowThrottlingCount = 0; | 76 s_allowThrottlingCount = 0; |
| 77 } | 77 } |
| 78 | 78 |
| 79 DocumentLifecycle::DisallowThrottlingScope::~DisallowThrottlingScope() { | 79 DocumentLifecycle::DisallowThrottlingScope::~DisallowThrottlingScope() { |
| 80 s_allowThrottlingCount = m_savedCount; | 80 s_allowThrottlingCount = m_savedCount; |
| 81 } | 81 } |
| 82 | 82 |
| 83 DocumentLifecycle::DocumentLifecycle() | 83 DocumentLifecycle::DocumentLifecycle() |
| 84 : m_state(Uninitialized), m_detachCount(0), m_disallowTransitionCount(0) {} | 84 : m_state(Uninitialized), |
|
yosin_UTC9
2016/11/25 09:52:37
How about moving these initialization into class d
Xiaocheng
2016/11/25 10:05:32
No objection, but that's a separate issue, though.
| |
| 85 m_detachCount(0), | |
| 86 m_disallowTransitionCount(0), | |
| 87 m_disallowStyleRecalcCount(0) {} | |
| 85 | 88 |
| 86 DocumentLifecycle::~DocumentLifecycle() {} | 89 DocumentLifecycle::~DocumentLifecycle() {} |
| 87 | 90 |
| 88 #if DCHECK_IS_ON() | 91 #if DCHECK_IS_ON() |
| 89 | 92 |
| 90 bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const { | 93 bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const { |
| 91 if (stateTransitionDisallowed()) | 94 if (stateTransitionDisallowed()) |
| 92 return false; | 95 return false; |
| 93 | 96 |
| 94 // We can stop from anywhere. | 97 // We can stop from anywhere. |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 345 DEBUG_STRING_CASE(Stopping); | 348 DEBUG_STRING_CASE(Stopping); |
| 346 DEBUG_STRING_CASE(Stopped); | 349 DEBUG_STRING_CASE(Stopped); |
| 347 } | 350 } |
| 348 | 351 |
| 349 NOTREACHED(); | 352 NOTREACHED(); |
| 350 return "Unknown"; | 353 return "Unknown"; |
| 351 } | 354 } |
| 352 #endif | 355 #endif |
| 353 | 356 |
| 354 } // namespace blink | 357 } // namespace blink |
| OLD | NEW |