Title: [208380] trunk
- Revision
- 208380
- Author
- [email protected]
- Date
- 2016-11-03 23:37:09 -0700 (Thu, 03 Nov 2016)
Log Message
IndexedDB 2.0: Handle IDBIndex rename behavior properly when version change transaction aborts.
https://bugs.webkit.org/show_bug.cgi?id=164403
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/IndexedDB/idbindex-rename-abort-expected.txt: Updated to passing expectations.
Source/WebCore:
No new tests (Covered by existing test).
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::rollbackInfoForVersionChangeAbort): Only rollback the info if this index
already existed before this version change transaction.
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208379 => 208380)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-11-04 06:34:46 UTC (rev 208379)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-11-04 06:37:09 UTC (rev 208380)
@@ -1,3 +1,12 @@
+2016-11-03 Brady Eidson <[email protected]>
+
+ IndexedDB 2.0: Handle IDBIndex rename behavior properly when version change transaction aborts.
+ https://bugs.webkit.org/show_bug.cgi?id=164403
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/IndexedDB/idbindex-rename-abort-expected.txt: Updated to passing expectations.
+
2016-11-03 Ryosuke Niwa <[email protected]>
Update custom elements tests
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-abort-expected.txt (208379 => 208380)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-abort-expected.txt 2016-11-04 06:34:46 UTC (rev 208379)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-abort-expected.txt 2016-11-04 06:37:09 UTC (rev 208380)
@@ -1,4 +1,4 @@
PASS IndexedDB index rename in aborted transaction
-FAIL IndexedDB index creation and rename in an aborted transaction assert_equals: IDBIndex.name should reflect the last rename immediately after transaction.abort() returns expected "by_author_renamed_again" but got "by_author"
+PASS IndexedDB index creation and rename in an aborted transaction
Modified: trunk/Source/WebCore/ChangeLog (208379 => 208380)
--- trunk/Source/WebCore/ChangeLog 2016-11-04 06:34:46 UTC (rev 208379)
+++ trunk/Source/WebCore/ChangeLog 2016-11-04 06:37:09 UTC (rev 208380)
@@ -1,3 +1,16 @@
+2016-11-03 Brady Eidson <[email protected]>
+
+ IndexedDB 2.0: Handle IDBIndex rename behavior properly when version change transaction aborts.
+ https://bugs.webkit.org/show_bug.cgi?id=164403
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Covered by existing test).
+
+ * Modules/indexeddb/IDBIndex.cpp:
+ (WebCore::IDBIndex::rollbackInfoForVersionChangeAbort): Only rollback the info if this index
+ already existed before this version change transaction.
+
2016-11-03 Youenn Fablet <[email protected]>
[WebRTC] Introduce asynchronous backend createOffer API
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (208379 => 208380)
--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp 2016-11-04 06:34:46 UTC (rev 208379)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp 2016-11-04 06:37:09 UTC (rev 208380)
@@ -134,6 +134,15 @@
void IDBIndex::rollbackInfoForVersionChangeAbort()
{
ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
+
+ // Only rollback to the original info if this index still exists in the rolled-back database info.
+ auto* objectStoreInfo = m_objectStore.transaction().database().info().infoForExistingObjectStore(m_objectStore.info().identifier());
+ if (!objectStoreInfo)
+ return;
+
+ if (!objectStoreInfo->hasIndex(m_info.identifier()))
+ return;
+
m_info = m_originalInfo;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes