Title: [259519] trunk/Source/WebCore
Revision
259519
Author
[email protected]
Date
2020-04-03 15:55:59 -0700 (Fri, 03 Apr 2020)

Log Message

ASSERTION FAILED: objectStoreInfo in SQLiteIDBBackingStore::getRecord
https://bugs.webkit.org/show_bug.cgi?id=209976
<rdar://problem/55005363>

Reviewed by Geoffrey Garen.

Return error if objectStoreInfo is null in SQLiteIDBBackingStore::getRecord, because there is a possibility
SQLiteIDBBackingStore does not have requested objectStoreInfo.

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (259518 => 259519)


--- trunk/Source/WebCore/ChangeLog	2020-04-03 22:45:16 UTC (rev 259518)
+++ trunk/Source/WebCore/ChangeLog	2020-04-03 22:55:59 UTC (rev 259519)
@@ -1,3 +1,17 @@
+2020-04-03  Sihui Liu  <[email protected]>
+
+        ASSERTION FAILED: objectStoreInfo in SQLiteIDBBackingStore::getRecord
+        https://bugs.webkit.org/show_bug.cgi?id=209976
+        <rdar://problem/55005363>
+
+        Reviewed by Geoffrey Garen.
+
+        Return error if objectStoreInfo is null in SQLiteIDBBackingStore::getRecord, because there is a possibility 
+        SQLiteIDBBackingStore does not have requested objectStoreInfo.
+
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
+
 2020-04-03  Wenson Hsieh  <[email protected]>
 
         Add more logging to help diagnose <webkit.org/b/209685>

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


--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp	2020-04-03 22:45:16 UTC (rev 259518)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp	2020-04-03 22:55:59 UTC (rev 259519)
@@ -2060,6 +2060,10 @@
     if (!transaction || !transaction->inProgress())
         return IDBError { UnknownError, "Attempt to get a record from database without an in-progress transaction"_s };
 
+    auto* objectStoreInfo = infoForObjectStore(objectStoreID);
+    if (!objectStoreInfo)
+        return IDBError { InvalidStateError, "Object store cannot be found in the backing store"_s };
+
     auto key = keyRange.lowerKey;
     if (key.isNull())
         key = IDBKeyData::minimum();
@@ -2178,9 +2182,7 @@
     if (!error.isNull())
         return error;
 
-    auto* objectStoreInfo = infoForObjectStore(objectStoreID);
-    ASSERT(objectStoreInfo);
-    resultValue = { keyData, { valueResultBuffer, WTFMove(blobURLs), WTFMove(blobFilePaths) }, objectStoreInfo->keyPath()};
+    resultValue = { keyData, { valueResultBuffer, WTFMove(blobURLs), WTFMove(blobFilePaths) }, objectStoreInfo->keyPath() };
     return IDBError { };
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to