Changeset 209176 in webkit


Ignore:
Timestamp:
Nov 30, 2016 11:05:42 PM (7 years ago)
Author:
beidson@apple.com
Message:

Unreviewed, rolling out r209168.

Caused 2 API tests to fail

Reverted changeset:

"IndexedDB: When doing puts, don't
"updateAllIndexesForAddRecord" if there are no indexes."
https://bugs.webkit.org/show_bug.cgi?id=165215
http://trac.webkit.org/changeset/209168

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r209174 r209176  
     12016-11-30  Brady Eidson  <beidson@apple.com>
     2
     3        Unreviewed, rolling out r209168.
     4
     5        Caused 2 API tests to fail
     6
     7        Reverted changeset:
     8
     9        "IndexedDB: When doing puts, don't
     10        "updateAllIndexesForAddRecord" if there are no indexes."
     11        https://bugs.webkit.org/show_bug.cgi?id=165215
     12        http://trac.webkit.org/changeset/209168
     13
    1142016-11-30  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
    215
  • trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp

    r209168 r209176  
    16611661    }
    16621662
    1663     if (!objectStoreInfo.indexMap().isEmpty()) {
    1664         auto error = updateAllIndexesForAddRecord(objectStoreInfo, keyData, value.data());
    1665 
    1666         if (!error.isNull()) {
    1667             auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"));
    1668             if (!sql
    1669                 || sql->bindInt64(1, objectStoreInfo.identifier()) != SQLITE_OK
    1670                 || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK
    1671                 || sql->step() != SQLITE_DONE) {
    1672                 LOG_ERROR("Indexing new object store record failed, but unable to remove the object store record itself");
    1673                 return { IDBDatabaseException::UnknownError, ASCIILiteral("Indexing new object store record failed, but unable to remove the object store record itself") };
    1674             }
    1675 
    1676             return error;
    1677         }
     1663    auto error = updateAllIndexesForAddRecord(objectStoreInfo, keyData, value.data());
     1664
     1665    if (!error.isNull()) {
     1666        auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"));
     1667        if (!sql
     1668            || sql->bindInt64(1, objectStoreInfo.identifier()) != SQLITE_OK
     1669            || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK
     1670            || sql->step() != SQLITE_DONE) {
     1671            LOG_ERROR("Indexing new object store record failed, but unable to remove the object store record itself");
     1672            return { IDBDatabaseException::UnknownError, ASCIILiteral("Indexing new object store record failed, but unable to remove the object store record itself") };
     1673        }
     1674
     1675        return error;
    16781676    }
    16791677
     
    17311729    transaction->notifyCursorsOfChanges(objectStoreInfo.identifier());
    17321730
    1733     return { };
     1731    return error;
    17341732}
    17351733
Note: See TracChangeset for help on using the changeset viewer.