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 efc1b4b99a161bf0e73e1faf24b2430f7a210383..331ccaa832cd364625f1331137b27b14b3aa9287 100644 |
| --- a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp |
| +++ b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp |
| @@ -38,6 +38,10 @@ namespace blink { |
| static DocumentLifecycle::DeprecatedTransition* s_deprecatedTransitionStack = 0; |
| +// TODO(skyostil): Come up with a better way to store cross-frame lifecycle |
| +// related data to avoid this being a global setting. |
| +static DocumentLifecycle::ThrottlingMode s_throttlingMode = DocumentLifecycle::ThrottlingMode::Allow; |
|
esprehn
2015/10/14 22:09:46
unsigned s_throttleCount
Sami
2015/10/16 16:48:08
Done (made it s_throttlingDisallowCount since that
|
| + |
| DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, State finalState) |
| : m_lifecycle(lifecycle) |
| , m_finalState(finalState) |
| @@ -291,6 +295,16 @@ void DocumentLifecycle::ensureStateAtMost(State state) |
| m_state = state; |
| } |
| +void DocumentLifecycle::setThrottlingMode(ThrottlingMode throttlingMode) |
| +{ |
| + s_throttlingMode = throttlingMode; |
| +} |
| + |
| +DocumentLifecycle::ThrottlingMode DocumentLifecycle::throttlingMode() const |
| +{ |
| + return s_throttlingMode; |
| +} |
| + |
| #if ENABLE(ASSERT) |
| #define DEBUG_STRING_CASE(StateName) \ |
| case StateName: return #StateName |