Title: [193990] trunk
Revision
193990
Author
[email protected]
Date
2015-12-11 15:52:48 -0800 (Fri, 11 Dec 2015)

Log Message

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

Reviewed by Alex Christensen.

Source/WebCore:

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

* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::continueFunction): Check against the current key, not the current primary key.
(WebCore::IDBClient::IDBCursor::setGetResult): Also save off the current IDBKeyData.
* Modules/indexeddb/client/IDBCursorImpl.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/cursor-continue-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (193989 => 193990)


--- trunk/LayoutTests/ChangeLog	2015-12-11 23:45:04 UTC (rev 193989)
+++ trunk/LayoutTests/ChangeLog	2015-12-11 23:52:48 UTC (rev 193990)
@@ -1,5 +1,15 @@
 2015-12-11  Brady Eidson  <[email protected]>
 
+        Modern IDB: storage/indexeddb/cursor-continue.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152192
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-wk1/TestExpectations:
+        * storage/indexeddb/cursor-continue-expected.txt:
+
+2015-12-11  Brady Eidson  <[email protected]>
+
         Modern IDB: storage/indexeddb/index-basics.html fails.
         https://bugs.webkit.org/show_bug.cgi?id=152190
 

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193989 => 193990)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-11 23:45:04 UTC (rev 193989)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-11 23:52:48 UTC (rev 193990)
@@ -92,7 +92,6 @@
 storage/indexeddb/unblocked-version-changes.html [ Skip ]
 
 # IDB tests with text failures                                                             
-storage/indexeddb/cursor-continue.html [ Failure ]
 storage/indexeddb/database-deletepending-flag.html [ Failure ]
 storage/indexeddb/delete-closed-database-object.html [ Failure ]
 storage/indexeddb/index-duplicate-keypaths.html [ Failure ]

Modified: trunk/LayoutTests/storage/indexeddb/cursor-continue-expected.txt (193989 => 193990)


--- trunk/LayoutTests/storage/indexeddb/cursor-continue-expected.txt	2015-12-11 23:45:04 UTC (rev 193989)
+++ trunk/LayoutTests/storage/indexeddb/cursor-continue-expected.txt	2015-12-11 23:52:48 UTC (rev 193990)
@@ -81,7 +81,7 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: DataError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
 
 indexObject.openKeyCursor(null, 'next')
 PASS event.target.result.primaryKey is 0
@@ -91,7 +91,7 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: DataError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
 
 indexObject.openKeyCursor(null, 'prev')
 PASS event.target.result.primaryKey is 17
@@ -101,7 +101,7 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: DataError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.
 
 indexObject.openKeyCursor(null, 'prev')
 PASS event.target.result.primaryKey is 17
@@ -112,12 +112,12 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: DataError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.
 Expecting exception from cursor.continue()
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'TransactionInactiveError'
-Exception message: TransactionInactiveError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/Source/WebCore/ChangeLog (193989 => 193990)


--- trunk/Source/WebCore/ChangeLog	2015-12-11 23:45:04 UTC (rev 193989)
+++ trunk/Source/WebCore/ChangeLog	2015-12-11 23:52:48 UTC (rev 193990)
@@ -1,5 +1,19 @@
 2015-12-11  Brady Eidson  <[email protected]>
 
+        Modern IDB: storage/indexeddb/cursor-continue.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152192
+
+        Reviewed by Alex Christensen.
+
+        No new tests (At least one failing test now passes).
+
+        * Modules/indexeddb/client/IDBCursorImpl.cpp:
+        (WebCore::IDBClient::IDBCursor::continueFunction): Check against the current key, not the current primary key.
+        (WebCore::IDBClient::IDBCursor::setGetResult): Also save off the current IDBKeyData.
+        * Modules/indexeddb/client/IDBCursorImpl.h:
+
+2015-12-11  Brady Eidson  <[email protected]>
+
         Modern IDB: storage/indexeddb/index-basics.html fails.
         https://bugs.webkit.org/show_bug.cgi?id=152190
 

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp (193989 => 193990)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp	2015-12-11 23:45:04 UTC (rev 193989)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp	2015-12-11 23:52:48 UTC (rev 193990)
@@ -226,7 +226,7 @@
 
 void IDBCursor::continueFunction(const IDBKeyData& key, ExceptionCodeWithMessage& ec)
 {
-    LOG(IndexedDB, "IDBCursor::continueFunction");
+    LOG(IndexedDB, "IDBCursor::continueFunction (to key %s)", key.loggingString().utf8().data());
 
     if (!m_request) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -257,12 +257,12 @@
     }
 
     if (m_info.isDirectionForward()) {
-        if (!key.isNull() && key.compare(m_currentPrimaryKeyData) <= 0) {
+        if (!key.isNull() && key.compare(m_currentKeyData) <= 0) {
             ec.code = IDBDatabaseException::DataError;
             ec.message = ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.");
             return;
         }
-    } else if (!key.isNull() && key.compare(m_currentPrimaryKeyData) >= 0) {
+    } else if (!key.isNull() && key.compare(m_currentKeyData) >= 0) {
         ec.code = IDBDatabaseException::DataError;
         ec.message = ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.");
         return;
@@ -330,6 +330,7 @@
 
     if (!getResult.isDefined()) {
         m_deprecatedCurrentKey = { };
+        m_currentKeyData = { };
         m_deprecatedCurrentPrimaryKey = { };
         m_currentPrimaryKeyData = { };
         m_deprecatedCurrentValue = { };
@@ -339,6 +340,7 @@
     }
 
     m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData());
+    m_currentKeyData = getResult.keyData();
     m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData());
     m_currentPrimaryKeyData = getResult.primaryKeyData();
 

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h (193989 => 193990)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h	2015-12-11 23:45:04 UTC (rev 193989)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h	2015-12-11 23:52:48 UTC (rev 193990)
@@ -92,6 +92,7 @@
 
     bool m_gotValue { false };
 
+    IDBKeyData m_currentKeyData;
     IDBKeyData m_currentPrimaryKeyData;
 
     // FIXME: When ditching Legacy IDB and combining this implementation with the abstract IDBCursor,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to