コード例 #1
0
// This is called if the associated ExecutionContext is destructing while
// we're still associated with it. That's our cue to disassociate and shutdown.
// To do this, we stop the database and let everything shutdown naturally
// because the database closing process may still make use of this context.
// It is not safe to just delete the context here.
void DatabaseContext::contextDestroyed()
{
    stopDatabases();
    ActiveDOMObject::contextDestroyed();
#if !defined(S_DATABASE_TRACKER)
    deref(); // paired with the ref() call on create().
#endif
}
コード例 #2
0
void DatabaseManager::stopDatabases(ScriptExecutionContext& context, DatabaseTaskSynchronizer* synchronizer)
{
    auto databaseContext = context.databaseContext();
    if (!databaseContext || !databaseContext->stopDatabases(synchronizer)) {
        if (synchronizer)
            synchronizer->taskCompleted();
    }
}
コード例 #3
0
ファイル: DatabaseContext.cpp プロジェクト: MYSHLIFE/webkit
DatabaseContext::~DatabaseContext()
{
    stopDatabases();
    ASSERT(!m_databaseThread || m_databaseThread->terminationRequested());

    // For debug accounting only. We must call this last. The assertions assume
    // this.
    DatabaseManager::manager().didDestructDatabaseContext();
}
コード例 #4
0
// This is called if the associated ExecutionContext is destructing while
// we're still associated with it. That's our cue to disassociate and shutdown.
// To do this, we stop the database and let everything shutdown naturally
// because the database closing process may still make use of this context.
// It is not safe to just delete the context here.
void DatabaseContext::contextDestroyed()
{
    RefPtrWillBeRawPtr<DatabaseContext> protector(this);
    stopDatabases();
    if (executionContext()->isWorkerGlobalScope())
        toWorkerGlobalScope(executionContext())->unregisterTerminationObserver(this);
    DatabaseManager::manager().unregisterDatabaseContext(this);
    ActiveDOMObject::contextDestroyed();
}
コード例 #5
0
ファイル: DatabaseContext.cpp プロジェクト: MYSHLIFE/webkit
// This is called if the associated ScriptExecutionContext is destructing while
// we're still associated with it. That's our cue to disassociate and shutdown.
// To do this, we stop the database and let everything shutdown naturally
// because the database closing process may still make use of this context.
// It is not safe to just delete the context here.
void DatabaseContext::contextDestroyed()
{
    stopDatabases();

    // Normally, willDestroyActiveDOMObject() is called in ~ActiveDOMObject().
    // However, we're here because the destructor hasn't been called, and the
    // ScriptExecutionContext we're associated with is about to be destructed.
    // So, go ahead an unregister self from the ActiveDOMObject list, and
    // set m_scriptExecutionContext to 0 so that ~ActiveDOMObject() doesn't
    // try to do so again.
    m_scriptExecutionContext->willDestroyActiveDOMObject(this);
    m_scriptExecutionContext = 0;
}
コード例 #6
0
// stop() is from stopActiveDOMObjects() which indicates that the owner LocalFrame
// or WorkerThread is shutting down. Initiate the orderly shutdown by stopping
// the associated databases.
void DatabaseContext::stop()
{
    stopDatabases();
}
コード例 #7
0
// This is called if the associated ExecutionContext is destructing while
// we're still associated with it. That's our cue to disassociate and shutdown.
// To do this, we stop the database and let everything shutdown naturally
// because the database closing process may still make use of this context.
// It is not safe to just delete the context here.
void DatabaseContext::contextDestroyed()
{
    stopDatabases();
    ActiveDOMObject::contextDestroyed();
    deref(); // paired with the ref() call on create().
}
コード例 #8
0
// This is called if the associated ExecutionContext is destructing while
// we're still associated with it. That's our cue to disassociate and shutdown.
// To do this, we stop the database and let everything shutdown naturally
// because the database closing process may still make use of this context.
// It is not safe to just delete the context here.
void DatabaseContext::contextDestroyed()
{
    stopDatabases();
    DatabaseManager::manager().unregisterDatabaseContext(this);
    ActiveDOMObject::contextDestroyed();
}
コード例 #9
0
ファイル: DatabaseContext.cpp プロジェクト: windyuuy/opera
// This is called if the associated ScriptExecutionContext is destructing while
// we're still associated with it. That's our cue to disassociate and shutdown.
// To do this, we stop the database and let everything shutdown naturally
// because the database closing process may still make use of this context.
// It is not safe to just delete the context here.
void DatabaseContext::contextDestroyed()
{
    stopDatabases();
    ActiveDOMObject::contextDestroyed();
}