Title: [120014] trunk/Source
Revision
120014
Author
[email protected]
Date
2012-06-11 15:41:55 -0700 (Mon, 11 Jun 2012)

Log Message

IndexedDB: Object stores are not successfully deleted
https://bugs.webkit.org/show_bug.cgi?id=88788

Reviewed by Tony Chang.

Source/WebCore:

Discovered while working on http://webkit.org/b/83074 - object stores are not
being deleted from the backing store. Deletion would succeed in the in-memory
data structures, but after closing/re-opening the backing store the object store
(but not its indexes/data) would reappear. Due to 83074, this isn't detectable
by DRT without a full restart.

Test: [chromium] webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.ComparisonTest'

* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):

Source/WebKit/chromium:

* tests/IDBLevelDBCodingTest.cpp:
(IDBLevelDBCoding::TEST):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120013 => 120014)


--- trunk/Source/WebCore/ChangeLog	2012-06-11 22:29:32 UTC (rev 120013)
+++ trunk/Source/WebCore/ChangeLog	2012-06-11 22:41:55 UTC (rev 120014)
@@ -1,3 +1,21 @@
+2012-06-11  Joshua Bell  <[email protected]>
+
+        IndexedDB: Object stores are not successfully deleted
+        https://bugs.webkit.org/show_bug.cgi?id=88788
+
+        Reviewed by Tony Chang.
+
+        Discovered while working on http://webkit.org/b/83074 - object stores are not
+        being deleted from the backing store. Deletion would succeed in the in-memory
+        data structures, but after closing/re-opening the backing store the object store
+        (but not its indexes/data) would reappear. Due to 83074, this isn't detectable
+        by DRT without a full restart.
+
+        Test: [chromium] webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.ComparisonTest'
+
+        * Modules/indexeddb/IDBLevelDBCoding.cpp:
+        (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
+
 2012-06-05  Eric Uhrhane <[email protected]>
 
         Crash in fast/files/read tests during Garbage Collection

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp (120013 => 120014)


--- trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp	2012-06-11 22:29:32 UTC (rev 120013)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp	2012-06-11 22:41:55 UTC (rev 120014)
@@ -1113,7 +1113,10 @@
     ASSERT(m_metaDataType >= 0);
     if (int x = compareInts(m_objectStoreId, other.m_objectStoreId))
         return x;
-    return m_metaDataType - other.m_metaDataType;
+    int64_t result = m_metaDataType - other.m_metaDataType;
+    if (result < 0)
+        return -1;
+    return (result > 0) ? 1 : result;
 }
 
 IndexMetaDataKey::IndexMetaDataKey()

Modified: trunk/Source/WebKit/chromium/ChangeLog (120013 => 120014)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-06-11 22:29:32 UTC (rev 120013)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-06-11 22:41:55 UTC (rev 120014)
@@ -1,3 +1,13 @@
+2012-06-11  Joshua Bell  <[email protected]>
+
+        IndexedDB: Object stores are not successfully deleted
+        https://bugs.webkit.org/show_bug.cgi?id=88788
+
+        Reviewed by Tony Chang.
+
+        * tests/IDBLevelDBCodingTest.cpp:
+        (IDBLevelDBCoding::TEST):
+
 2012-06-11  Shawn Singh  <[email protected]>
 
         [chromium] Implement position:fixed in compositor thread

Modified: trunk/Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp (120013 => 120014)


--- trunk/Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp	2012-06-11 22:29:32 UTC (rev 120013)
+++ trunk/Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp	2012-06-11 22:41:55 UTC (rev 120014)
@@ -620,10 +620,17 @@
     keys.append(DatabaseNameKey::encode("a", "a"));
     keys.append(DatabaseMetaDataKey::encode(1, DatabaseMetaDataKey::kOriginName));
     keys.append(ObjectStoreMetaDataKey::encode(1, 1, 0));
+    keys.append(ObjectStoreMetaDataKey::encode(1, 1, 1));
+    keys.append(ObjectStoreMetaDataKey::encodeMaxKey(1, 1));
+    keys.append(ObjectStoreMetaDataKey::encodeMaxKey(1, 2));
     keys.append(ObjectStoreMetaDataKey::encodeMaxKey(1));
     keys.append(IndexMetaDataKey::encode(1, 1, 30, 0));
     keys.append(IndexMetaDataKey::encode(1, 1, 31, 0));
     keys.append(IndexMetaDataKey::encode(1, 1, 31, 1));
+    keys.append(IndexMetaDataKey::encodeMaxKey(1, 1, 31));
+    keys.append(IndexMetaDataKey::encodeMaxKey(1, 1, 32));
+    keys.append(IndexMetaDataKey::encodeMaxKey(1, 1));
+    keys.append(IndexMetaDataKey::encodeMaxKey(1, 2));
     keys.append(ObjectStoreFreeListKey::encode(1, 1));
     keys.append(ObjectStoreFreeListKey::encodeMaxKey(1));
     keys.append(IndexFreeListKey::encode(1, 1, kMinimumIndexId));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to