| Index: third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
|
| index fbd88b6faf52a3c38bd8ae8f583ff08bdab8ca06..22edb47cb371dd01f2463266bda366604208da29 100644
|
| --- a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
|
| @@ -27,18 +27,19 @@
|
|
|
| #include "core/dom/ContextLifecycleNotifier.h"
|
|
|
| -#include "core/dom/ActiveDOMObject.h"
|
| +#include "core/dom/SuspendableObject.h"
|
| #include "wtf/AutoReset.h"
|
|
|
| namespace blink {
|
|
|
| -void ContextLifecycleNotifier::notifyResumingActiveDOMObjects() {
|
| +void ContextLifecycleNotifier::notifyResumingSuspendableObjects() {
|
| AutoReset<IterationState> scope(&m_iterationState, AllowingNone);
|
| for (ContextLifecycleObserver* observer : m_observers) {
|
| if (observer->observerType() !=
|
| - ContextLifecycleObserver::ActiveDOMObjectType)
|
| + ContextLifecycleObserver::SuspendableObjectType)
|
| continue;
|
| - ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observer);
|
| + SuspendableObject* activeDOMObject =
|
| + static_cast<SuspendableObject*>(observer);
|
| #if DCHECK_IS_ON()
|
| DCHECK_EQ(activeDOMObject->getExecutionContext(), context());
|
| DCHECK(activeDOMObject->suspendIfNeededCalled());
|
| @@ -47,13 +48,14 @@ void ContextLifecycleNotifier::notifyResumingActiveDOMObjects() {
|
| }
|
| }
|
|
|
| -void ContextLifecycleNotifier::notifySuspendingActiveDOMObjects() {
|
| +void ContextLifecycleNotifier::notifySuspendingSuspendableObjects() {
|
| AutoReset<IterationState> scope(&m_iterationState, AllowingNone);
|
| for (ContextLifecycleObserver* observer : m_observers) {
|
| if (observer->observerType() !=
|
| - ContextLifecycleObserver::ActiveDOMObjectType)
|
| + ContextLifecycleObserver::SuspendableObjectType)
|
| continue;
|
| - ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observer);
|
| + SuspendableObject* activeDOMObject =
|
| + static_cast<SuspendableObject*>(observer);
|
| #if DCHECK_IS_ON()
|
| DCHECK_EQ(activeDOMObject->getExecutionContext(), context());
|
| DCHECK(activeDOMObject->suspendIfNeededCalled());
|
| @@ -67,7 +69,7 @@ unsigned ContextLifecycleNotifier::activeDOMObjectCount() const {
|
| unsigned activeDOMObjects = 0;
|
| for (ContextLifecycleObserver* observer : m_observers) {
|
| if (observer->observerType() !=
|
| - ContextLifecycleObserver::ActiveDOMObjectType)
|
| + ContextLifecycleObserver::SuspendableObjectType)
|
| continue;
|
| activeDOMObjects++;
|
| }
|
| @@ -75,13 +77,14 @@ unsigned ContextLifecycleNotifier::activeDOMObjectCount() const {
|
| }
|
|
|
| #if DCHECK_IS_ON()
|
| -bool ContextLifecycleNotifier::contains(ActiveDOMObject* object) const {
|
| +bool ContextLifecycleNotifier::contains(SuspendableObject* object) const {
|
| DCHECK(!isIteratingOverObservers());
|
| for (ContextLifecycleObserver* observer : m_observers) {
|
| if (observer->observerType() !=
|
| - ContextLifecycleObserver::ActiveDOMObjectType)
|
| + ContextLifecycleObserver::SuspendableObjectType)
|
| continue;
|
| - ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observer);
|
| + SuspendableObject* activeDOMObject =
|
| + static_cast<SuspendableObject*>(observer);
|
| if (activeDOMObject == object)
|
| return true;
|
| }
|
|
|