Modern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jan 2016 22:17:15 +0000 (22:17 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jan 2016 22:17:15 +0000 (22:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152849

Reviewed by Alex Christensen.

Source/WebCore:

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

* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::iterate): Don't allow returning an iterator outside of
  the cursor's assigned range.

LayoutTests:

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194726 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp

index 75c3ffa..cf81761 100644 (file)
@@ -1,3 +1,12 @@
+2016-01-07  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152849
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-wk1/TestExpectations:
+
 2016-01-07  Alexey Proskuryakov  <ap@apple.com>
 
         testRunner.runUIScript crashes while running multiple tests in a row that invokes the same UIScript
index d981d8c..f18564b 100644 (file)
@@ -74,7 +74,6 @@ imported/w3c/indexeddb/interfaces.html [ Skip ]
 imported/w3c/indexeddb/keyorder.htm [ Skip ]
 
 # W3C IDB tests - Legacy IDB passes, Modern IDB fails
-imported/w3c/indexeddb/idbcursor-continue.htm [ Failure ]
 imported/w3c/indexeddb/idbobjectstore_add16.htm [ Failure ]
 imported/w3c/indexeddb/idbobjectstore_clear4.htm [ Failure ]
 imported/w3c/indexeddb/idbobjectstore_count4.htm [ Failure ]
index b38163e..960ecfe 100644 (file)
@@ -1,3 +1,16 @@
+2016-01-07  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152849
+
+        Reviewed by Alex Christensen.
+
+        No new tests (At least one failing test now passes).
+
+        * Modules/indexeddb/server/MemoryIndexCursor.cpp:
+        (WebCore::IDBServer::MemoryIndexCursor::iterate): Don't allow returning an iterator outside of
+          the cursor's assigned range.
+
 2016-01-07  Zalan Bujtas  <zalan@apple.com>
 
         Incorrect position: fixed; rendering when child of position:relative/sticky.
index 35cc865..fec8106 100644 (file)
@@ -99,6 +99,9 @@ void MemoryIndexCursor::iterate(const IDBKeyData& key, uint32_t count, IDBGetRes
         else
             m_currentIterator = valueStore->reverseFind(key, m_info.duplicity());
 
+        if (m_currentIterator.isValid() && !m_info.range().containsKey(m_currentIterator.key()))
+            m_currentIterator.invalidate();
+
         if (!m_currentIterator.isValid()) {
             m_currentKey = { };
             m_currentPrimaryKey = { };