| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 { | 69 { |
| 70 s_allowThrottlingCount++; | 70 s_allowThrottlingCount++; |
| 71 } | 71 } |
| 72 | 72 |
| 73 DocumentLifecycle::AllowThrottlingScope::~AllowThrottlingScope() | 73 DocumentLifecycle::AllowThrottlingScope::~AllowThrottlingScope() |
| 74 { | 74 { |
| 75 DCHECK_GT(s_allowThrottlingCount, 0u); | 75 DCHECK_GT(s_allowThrottlingCount, 0u); |
| 76 s_allowThrottlingCount--; | 76 s_allowThrottlingCount--; |
| 77 } | 77 } |
| 78 | 78 |
| 79 DocumentLifecycle::DisallowThrottlingScope::DisallowThrottlingScope(DocumentLife
cycle& lifecycle) |
| 80 { |
| 81 m_savedCount = s_allowThrottlingCount; |
| 82 s_allowThrottlingCount = 0; |
| 83 } |
| 84 |
| 85 DocumentLifecycle::DisallowThrottlingScope::~DisallowThrottlingScope() |
| 86 { |
| 87 s_allowThrottlingCount = m_savedCount; |
| 88 } |
| 89 |
| 79 DocumentLifecycle::DocumentLifecycle() | 90 DocumentLifecycle::DocumentLifecycle() |
| 80 : m_state(Uninitialized) | 91 : m_state(Uninitialized) |
| 81 , m_detachCount(0) | 92 , m_detachCount(0) |
| 82 { | 93 { |
| 83 } | 94 } |
| 84 | 95 |
| 85 DocumentLifecycle::~DocumentLifecycle() | 96 DocumentLifecycle::~DocumentLifecycle() |
| 86 { | 97 { |
| 87 } | 98 } |
| 88 | 99 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 DEBUG_STRING_CASE(Stopping); | 334 DEBUG_STRING_CASE(Stopping); |
| 324 DEBUG_STRING_CASE(Stopped); | 335 DEBUG_STRING_CASE(Stopped); |
| 325 } | 336 } |
| 326 | 337 |
| 327 ASSERT_NOT_REACHED(); | 338 ASSERT_NOT_REACHED(); |
| 328 return "Unknown"; | 339 return "Unknown"; |
| 329 } | 340 } |
| 330 #endif | 341 #endif |
| 331 | 342 |
| 332 } // namespace blink | 343 } // namespace blink |
| OLD | NEW |