| Index: third_party/WebKit/Source/core/dom/SuspendableObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp b/third_party/WebKit/Source/core/dom/SuspendableObject.cpp
|
| similarity index 75%
|
| rename from third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp
|
| rename to third_party/WebKit/Source/core/dom/SuspendableObject.cpp
|
| index 7921c5c7a760cc11d64fcf300c87ba4fe3686aa9..5338ffd53d1b129ee307f1e176364a3c30671e35 100644
|
| --- a/third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/SuspendableObject.cpp
|
| @@ -24,46 +24,49 @@
|
| *
|
| */
|
|
|
| -#include "core/dom/ActiveDOMObject.h"
|
| +#include "core/dom/SuspendableObject.h"
|
|
|
| #include "core/dom/ExecutionContext.h"
|
| #include "platform/InstanceCounters.h"
|
|
|
| namespace blink {
|
|
|
| -ActiveDOMObject::ActiveDOMObject(ExecutionContext* executionContext)
|
| - : ContextLifecycleObserver(executionContext, ActiveDOMObjectType)
|
| +SuspendableObject::SuspendableObject(ExecutionContext* executionContext)
|
| + : ContextLifecycleObserver(executionContext, SuspendableObjectType)
|
| #if DCHECK_IS_ON()
|
| ,
|
| m_suspendIfNeededCalled(false)
|
| #endif
|
| {
|
| DCHECK(!executionContext || executionContext->isContextThread());
|
| - InstanceCounters::incrementCounter(InstanceCounters::ActiveDOMObjectCounter);
|
| + InstanceCounters::incrementCounter(
|
| + InstanceCounters::SuspendableObjectCounter);
|
| }
|
|
|
| -ActiveDOMObject::~ActiveDOMObject() {
|
| - InstanceCounters::decrementCounter(InstanceCounters::ActiveDOMObjectCounter);
|
| +SuspendableObject::~SuspendableObject() {
|
| + InstanceCounters::decrementCounter(
|
| + InstanceCounters::SuspendableObjectCounter);
|
|
|
| #if DCHECK_IS_ON()
|
| DCHECK(m_suspendIfNeededCalled);
|
| #endif
|
| }
|
|
|
| -void ActiveDOMObject::suspendIfNeeded() {
|
| +void SuspendableObject::suspendIfNeeded() {
|
| #if DCHECK_IS_ON()
|
| DCHECK(!m_suspendIfNeededCalled);
|
| m_suspendIfNeededCalled = true;
|
| #endif
|
| if (ExecutionContext* context = getExecutionContext())
|
| - context->suspendActiveDOMObjectIfNeeded(this);
|
| + context->suspendSuspendableObjectIfNeeded(this);
|
| }
|
|
|
| -void ActiveDOMObject::suspend() {}
|
| +void SuspendableObject::suspend() {}
|
|
|
| -void ActiveDOMObject::resume() {}
|
| +void SuspendableObject::resume() {}
|
|
|
| -void ActiveDOMObject::didMoveToNewExecutionContext(ExecutionContext* context) {
|
| +void SuspendableObject::didMoveToNewExecutionContext(
|
| + ExecutionContext* context) {
|
| setContext(context);
|
|
|
| if (context->isContextDestroyed()) {
|
|
|