Title: [193994] trunk

Diff

Modified: trunk/LayoutTests/ChangeLog (193993 => 193994)


--- trunk/LayoutTests/ChangeLog	2015-12-12 00:17:24 UTC (rev 193993)
+++ trunk/LayoutTests/ChangeLog	2015-12-12 00:18:18 UTC (rev 193994)
@@ -1,5 +1,17 @@
 2015-12-11  Brady Eidson  <[email protected]>
 
+        Modern IDB: storage/indexeddb/optional-arguments.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152194
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-wk1/TestExpectations:
+        * storage/indexeddb/invalid-keys-expected.txt: Updated for new error message.
+        * storage/indexeddb/optional-arguments-expected.txt: Remove results that expect IDBObjectStore.openKeyCursor() to be
+          a thing. That method no longer exists in the spec and was already removed from the test.
+
+2015-12-11  Brady Eidson  <[email protected]>
+
         Modern IDB: storage/indexeddb/cursor-continue.html fails.
         https://bugs.webkit.org/show_bug.cgi?id=152192
 

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193993 => 193994)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-12 00:17:24 UTC (rev 193993)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-12 00:18:18 UTC (rev 193994)
@@ -104,7 +104,6 @@
 storage/indexeddb/open-cursor.html [ Failure ]
 storage/indexeddb/open-db-private-browsing.html [ Failure ]
 storage/indexeddb/open-ordering.html [ Failure ]
-storage/indexeddb/optional-arguments.html [ Failure ]
 storage/indexeddb/properties-disabled-at-runtime.html [ Failure ]
 storage/indexeddb/setversion-blocked-by-versionchange-close.html [ Failure ]
 storage/indexeddb/transaction-scope-sequencing.html [ Failure ]

Modified: trunk/LayoutTests/storage/indexeddb/invalid-keys-expected.txt (193993 => 193994)


--- trunk/LayoutTests/storage/indexeddb/invalid-keys-expected.txt	2015-12-12 00:17:24 UTC (rev 193993)
+++ trunk/LayoutTests/storage/indexeddb/invalid-keys-expected.txt	2015-12-12 00:18:18 UTC (rev 193994)
@@ -13,7 +13,7 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
+Exception message: Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
 Expecting exception from request = objectStore.put('value', null)
 PASS Exception was thrown.
 PASS code is 0

Modified: trunk/LayoutTests/storage/indexeddb/optional-arguments-expected.txt (193993 => 193994)


--- trunk/LayoutTests/storage/indexeddb/optional-arguments-expected.txt	2015-12-12 00:17:24 UTC (rev 193993)
+++ trunk/LayoutTests/storage/indexeddb/optional-arguments-expected.txt	2015-12-12 00:18:18 UTC (rev 193994)
@@ -55,30 +55,6 @@
 PASS continues is 1
 
 verifyCursor():
-request = store.openKeyCursor()
-cursor = request.result
-PASS cursor.direction is "next"
-PASS continues is 5
-
-verifyCursor():
-request = store.openKeyCursor(null)
-cursor = request.result
-PASS cursor.direction is "next"
-PASS continues is 5
-
-verifyCursor():
-request = store.openKeyCursor(IDBKeyRange.lowerBound(4))
-cursor = request.result
-PASS cursor.direction is "next"
-PASS continues is 2
-
-verifyCursor():
-request = store.openKeyCursor(3)
-cursor = request.result
-PASS cursor.direction is "next"
-PASS continues is 1
-
-verifyCursor():
 request = index.openCursor()
 cursor = request.result
 PASS cursor.direction is "next"

Modified: trunk/Source/WebCore/ChangeLog (193993 => 193994)


--- trunk/Source/WebCore/ChangeLog	2015-12-12 00:17:24 UTC (rev 193993)
+++ trunk/Source/WebCore/ChangeLog	2015-12-12 00:18:18 UTC (rev 193994)
@@ -1,5 +1,21 @@
 2015-12-11  Brady Eidson  <[email protected]>
 
+        Modern IDB: storage/indexeddb/optional-arguments.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152194
+
+        Reviewed by Alex Christensen.
+
+        No new tests (At least one failing test now passes).
+
+        * Modules/indexeddb/client/IDBCursorImpl.cpp:
+        (WebCore::IDBClient::IDBCursor::continueFunction): Allow 'undefined' for the key.
+        
+        * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+        (WebCore::IDBClient::IDBObjectStore::add): Ditto.
+        (WebCore::IDBClient::IDBObjectStore::put): Ditto.
+
+2015-12-11  Brady Eidson  <[email protected]>
+
         Followup to:
         Modern IDB: storage/indexeddb/index-count.html fails.
         https://bugs.webkit.org/show_bug.cgi?id=152175

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


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp	2015-12-12 00:17:24 UTC (rev 193993)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp	2015-12-12 00:18:18 UTC (rev 193994)
@@ -220,7 +220,10 @@
     }
 
     DOMRequestState requestState(context);
-    RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue);
+    RefPtr<IDBKey> key;
+    if (!keyValue.jsValue().isUndefined())
+        key = scriptValueToIDBKey(&requestState, keyValue);
+
     continueFunction(key.get(), ec);
 }
 

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp (193993 => 193994)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp	2015-12-12 00:17:24 UTC (rev 193993)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp	2015-12-12 00:18:18 UTC (rev 193994)
@@ -214,13 +214,17 @@
 
 RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
 {
-    auto idbKey = scriptValueToIDBKey(execState, key);
+    RefPtr<IDBKey> idbKey;
+    if (!key.isUndefined())
+        idbKey = scriptValueToIDBKey(execState, key);
     return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
 }
 
 RefPtr<WebCore::IDBRequest> IDBObjectStore::put(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
 {
-    auto idbKey = scriptValueToIDBKey(execState, key);
+    RefPtr<IDBKey> idbKey;
+    if (!key.isUndefined())
+        idbKey = scriptValueToIDBKey(execState, key);
     return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to