Title: [115743] trunk/Source/WebCore
- Revision
- 115743
- Author
- [email protected]
- Date
- 2012-05-01 12:05:25 -0700 (Tue, 01 May 2012)
Log Message
IndexedDB: stale index entries may not be removed in some cases
https://bugs.webkit.org/show_bug.cgi?id=85224
Patch by Douglas Stockwell <[email protected]> on 2012-05-01
Reviewed by Ojan Vafai.
Ensure that stale index entries are removed when the corresponding
object store entry no longer exists.
No new tests. Addresses a performance / storage leak that is
not amenable to verification in a layout test.
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (115742 => 115743)
--- trunk/Source/WebCore/ChangeLog 2012-05-01 18:50:16 UTC (rev 115742)
+++ trunk/Source/WebCore/ChangeLog 2012-05-01 19:05:25 UTC (rev 115743)
@@ -1,3 +1,19 @@
+2012-05-01 Douglas Stockwell <[email protected]>
+
+ IndexedDB: stale index entries may not be removed in some cases
+ https://bugs.webkit.org/show_bug.cgi?id=85224
+
+ Reviewed by Ojan Vafai.
+
+ Ensure that stale index entries are removed when the corresponding
+ object store entry no longer exists.
+
+ No new tests. Addresses a performance / storage leak that is
+ not amenable to verification in a layout test.
+
+ * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
+ (WebCore):
+
2012-05-01 Igor Oliveira <[email protected]>
Use HashMap<OwnPtr> for CounterMap in RenderCounter
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp (115742 => 115743)
--- trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp 2012-05-01 18:50:16 UTC (rev 115742)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp 2012-05-01 19:05:25 UTC (rev 115743)
@@ -1285,8 +1285,10 @@
Vector<char> primaryLevelDBKey = ObjectStoreDataKey::encode(indexDataKey.databaseId(), indexDataKey.objectStoreId(), *m_primaryKey);
Vector<char> result;
- if (!m_transaction->get(primaryLevelDBKey, result))
+ if (!m_transaction->get(primaryLevelDBKey, result)) {
+ m_transaction->remove(m_iterator->key());
return false;
+ }
int64_t objectStoreDataVersion;
const char* t = decodeVarInt(result.begin(), result.end(), objectStoreDataVersion);
@@ -1366,8 +1368,10 @@
m_primaryLevelDBKey = ObjectStoreDataKey::encode(indexDataKey.databaseId(), indexDataKey.objectStoreId(), *m_primaryKey);
Vector<char> result;
- if (!m_transaction->get(m_primaryLevelDBKey, result))
+ if (!m_transaction->get(m_primaryLevelDBKey, result)) {
+ m_transaction->remove(m_iterator->key());
return false;
+ }
int64_t objectStoreDataVersion;
const char* t = decodeVarInt(result.begin(), result.end(), objectStoreDataVersion);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes