⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243615 in webkit


Ignore:
Timestamp:
Mar 28, 2019, 12:18:10 PM (7 years ago)
Author:
sihui_liu@apple.com
Message:

Crash at IDBDatabaseInfo::infoForExistingObjectStore and IDBDatabaseInfo::infoForExistingObjectStore
https://bugs.webkit.org/show_bug.cgi?id=196120
<rdar://problem/39869767>

Reviewed by Ryosuke Niwa.

No new tests because it is unclear how the crash happens. Added release logging to help debug.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r243611 r243615  
     12019-03-28  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Crash at IDBDatabaseInfo::infoForExistingObjectStore and IDBDatabaseInfo::infoForExistingObjectStore
     4        https://bugs.webkit.org/show_bug.cgi?id=196120
     5        <rdar://problem/39869767>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        No new tests because it is unclear how the crash happens. Added release logging to help debug.
     10
     11        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
     12        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
     13        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
     14        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
     15        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
     16
    1172019-03-28  Devin Rousso  <drousso@apple.com>
    218
  • trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp

    r243019 r243615  
    12951295    }
    12961296
     1297    ASSERT(m_databaseInfo);
     1298    if (!m_databaseInfo) {
     1299        RELEASE_LOG_ERROR(IndexedDB, "%p - SQLiteIDBBackingStore::clearObjectStore: m_databaseInfo is null", this);
     1300        return IDBError { UnknownError, "Database info is invalid"_s };
     1301    }
     1302
    12971303    auto* objectStore = m_databaseInfo->infoForExistingObjectStore(info.objectStoreIdentifier());
    12981304    ASSERT(objectStore);
  • trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp

    r243402 r243615  
    10021002    LOG(IndexedDB, "(db) UniqueIDBDatabase::performCreateIndex");
    10031003
     1004    IDBError error;
    10041005    ASSERT(m_backingStore);
    1005     IDBError error = m_backingStore->createIndex(transactionIdentifier, info);
    1006 
     1006    if (!m_backingStore) {
     1007        RELEASE_LOG_ERROR(IndexedDB, "%p - UniqueIDBDatabase::performCreateIndex: m_backingStore is null", this);
     1008        error = IDBError(InvalidStateError, "Backing store is invalid for call to create index"_s);
     1009        postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformCreateIndex, callbackIdentifier, error, info));
     1010        return;
     1011    }
     1012
     1013    error = m_backingStore->createIndex(transactionIdentifier, info);
    10071014    postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformCreateIndex, callbackIdentifier, error, info));
    10081015}
     
    12001207    IDBKeyData usedKey;
    12011208    IDBError error;
     1209
     1210    if (!m_backingStore) {
     1211        RELEASE_LOG_ERROR(IndexedDB, "%p - UniqueIDBDatabase::performPutOrAdd: m_backingStore is null", this);
     1212        error = IDBError(InvalidStateError, "Backing store is invalid for call to put or add"_s);
     1213        postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, error, usedKey));
     1214        return;
     1215    }
    12021216
    12031217    auto* objectStoreInfo = m_backingStore->infoForObjectStore(objectStoreIdentifier);
Note: See TracChangeset for help on using the changeset viewer.