Title: [193755] trunk
Revision
193755
Author
beid...@apple.com
Date
2015-12-08 09:37:35 -0800 (Tue, 08 Dec 2015)

Log Message

Modern IDB: storage/indexeddb/index-cursor.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151973

Reviewed by Darin Adler.

Source/WebCore:

No new tests (At least one failing test now passes).

* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor): When the initial cursor creation
  generates an iterator outside of the cursor's IDBKeyRange, invalidate the iterator.

LayoutTests:

* platform/mac-wk1/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (193754 => 193755)


--- trunk/LayoutTests/ChangeLog	2015-12-08 17:35:31 UTC (rev 193754)
+++ trunk/LayoutTests/ChangeLog	2015-12-08 17:37:35 UTC (rev 193755)
@@ -1,3 +1,12 @@
+2015-12-08  Brady Eidson  <beid...@apple.com>
+
+        Modern IDB: storage/indexeddb/index-cursor.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=151973
+
+        Reviewed by Darin Adler.
+
+        * platform/mac-wk1/TestExpectations:
+
 2015-12-08  Csaba Osztrogonác  <o...@webkit.org>
 
         [EFL] REGRESSION(r173394): MiniBrowser stucked in an infinite loop if NETWORK_CACHE is disabled

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193754 => 193755)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-08 17:35:31 UTC (rev 193754)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-08 17:37:35 UTC (rev 193755)
@@ -119,7 +119,6 @@
 storage/indexeddb/factory-cmp.html [ Failure ]
 storage/indexeddb/index-basics.html [ Failure ]
 storage/indexeddb/index-count.html [ Failure ]
-storage/indexeddb/index-cursor.html [ Failure ]
 storage/indexeddb/index-duplicate-keypaths.html [ Failure ]
 storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html [ Failure ]
 storage/indexeddb/intversion-close-between-events.html [ Failure ]

Modified: trunk/Source/WebCore/ChangeLog (193754 => 193755)


--- trunk/Source/WebCore/ChangeLog	2015-12-08 17:35:31 UTC (rev 193754)
+++ trunk/Source/WebCore/ChangeLog	2015-12-08 17:37:35 UTC (rev 193755)
@@ -1,3 +1,16 @@
+2015-12-08  Brady Eidson  <beid...@apple.com>
+
+        Modern IDB: storage/indexeddb/index-cursor.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=151973
+
+        Reviewed by Darin Adler.
+
+        No new tests (At least one failing test now passes).
+
+        * Modules/indexeddb/server/MemoryIndexCursor.cpp:
+        (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor): When the initial cursor creation
+          generates an iterator outside of the cursor's IDBKeyRange, invalidate the iterator.
+          
 2015-12-08  Joanmarie Diggs  <jdi...@igalia.com>
 
         [EFL] some ax tests have been failed since r186692

Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp (193754 => 193755)


--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp	2015-12-08 17:35:31 UTC (rev 193754)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp	2015-12-08 17:37:35 UTC (rev 193755)
@@ -42,6 +42,8 @@
     : MemoryCursor(info)
     , m_index(index)
 {
+    LOG(IndexedDB, "MemoryIndexCursor::MemoryIndexCursor %s", info.range().loggingString().utf8().data());
+
     auto* valueStore = m_index.valueStore();
     if (!valueStore)
         return;
@@ -51,11 +53,12 @@
     else
         m_currentIterator = valueStore->reverseFind(m_info.range().upperKey, m_info.duplicity(), m_info.range().upperOpen);
 
-    if (m_currentIterator.isValid()) {
+    if (m_currentIterator.isValid() && m_info.range().containsKey(m_currentIterator.key())) {
         m_currentKey = m_currentIterator.key();
         m_currentPrimaryKey = m_currentIterator.primaryKey();
         m_index.cursorDidBecomeClean(*this);
-    }
+    } else
+        m_currentIterator.invalidate();
 }
 
 MemoryIndexCursor::~MemoryIndexCursor()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to