예제 #1
0
void ActiveDOMObject::didMoveToNewExecutionContext(ExecutionContext* context)
{
    observeContext(context);

    if (context->activeDOMObjectsAreStopped()) {
        stop();
        return;
    }

    if (context->activeDOMObjectsAreSuspended()) {
        suspend();
        return;
    }

    resume();
}
ContextDestructionObserver::ContextDestructionObserver(ScriptExecutionContext* scriptExecutionContext)
    : m_scriptExecutionContext(0)
{
    observeContext(scriptExecutionContext);
}
ContextDestructionObserver::~ContextDestructionObserver()
{
    observeContext(0);
}
ContextDestructionObserver::~ContextDestructionObserver()
{
    observeContext(nullptr);
}