Title: [209176] trunk/Source/WebCore
Revision
209176
Author
beid...@apple.com
Date
2016-11-30 23:05:42 -0800 (Wed, 30 Nov 2016)

Log 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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (209175 => 209176)


--- trunk/Source/WebCore/ChangeLog	2016-12-01 07:04:18 UTC (rev 209175)
+++ trunk/Source/WebCore/ChangeLog	2016-12-01 07:05:42 UTC (rev 209176)
@@ -1,3 +1,16 @@
+2016-11-30  Brady Eidson  <beid...@apple.com>
+
+        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
+
 2016-11-30  Gyuyoung Kim  <gyuyoung....@webkit.org>
 
         Build break when using --minimal

Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (209175 => 209176)


--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp	2016-12-01 07:04:18 UTC (rev 209175)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp	2016-12-01 07:05:42 UTC (rev 209176)
@@ -1660,21 +1660,19 @@
         recordID = m_sqliteDB->lastInsertRowID();
     }
 
-    if (!objectStoreInfo.indexMap().isEmpty()) {
-        auto error = updateAllIndexesForAddRecord(objectStoreInfo, keyData, value.data());
+    auto error = updateAllIndexesForAddRecord(objectStoreInfo, keyData, value.data());
 
-        if (!error.isNull()) {
-            auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"));
-            if (!sql
-                || sql->bindInt64(1, objectStoreInfo.identifier()) != SQLITE_OK
-                || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK
-                || sql->step() != SQLITE_DONE) {
-                LOG_ERROR("Indexing new object store record failed, but unable to remove the object store record itself");
-                return { IDBDatabaseException::UnknownError, ASCIILiteral("Indexing new object store record failed, but unable to remove the object store record itself") };
-            }
+    if (!error.isNull()) {
+        auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"));
+        if (!sql
+            || sql->bindInt64(1, objectStoreInfo.identifier()) != SQLITE_OK
+            || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK
+            || sql->step() != SQLITE_DONE) {
+            LOG_ERROR("Indexing new object store record failed, but unable to remove the object store record itself");
+            return { IDBDatabaseException::UnknownError, ASCIILiteral("Indexing new object store record failed, but unable to remove the object store record itself") };
+        }
 
-            return error;
-        }
+        return error;
     }
 
     const Vector<String>& blobURLs = value.blobURLs();
@@ -1730,7 +1728,7 @@
 
     transaction->notifyCursorsOfChanges(objectStoreInfo.identifier());
 
-    return { };
+    return error;
 }
 
 IDBError SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord(int64_t objectStoreRecord, Vector<String>& blobURLs, Vector<String>& blobFilePaths)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to