예제 #1
0
void IDBOpenDBRequest::fireErrorAfterVersionChangeAbort()
{
    LOG(IndexedDB, "IDBOpenDBRequest::fireErrorAfterVersionChangeAbort()");

    ASSERT(hasPendingActivity());

    IDBError idbError(IDBDatabaseException::AbortError);
    m_domError = DOMError::create(idbError.name());

    m_transaction->addRequest(*this);
    enqueueEvent(Event::create(eventNames().errorEvent, true, true));
}
예제 #2
0
void IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion()
{
    LOG(IndexedDB, "IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion() - %s", resourceIdentifier().loggingString().utf8().data());

    ASSERT(currentThread() == originThreadID());
    ASSERT(hasPendingActivity());

    IDBError idbError(IDBDatabaseException::AbortError);
    m_domError = DOMError::create(idbError.name(), idbError.message());
    setResultToUndefined();

    m_transaction->addRequest(*this);
    enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this));
}