Changeset 193994 in webkit


Ignore:
Timestamp:
Dec 11, 2015, 4:18:18 PM (10 years ago)
Author:
beidson@apple.com
Message:

tmp for 152194

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r193990 r193994  
     12015-12-11  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: storage/indexeddb/optional-arguments.html fails.
     4        https://bugs.webkit.org/show_bug.cgi?id=152194
     5
     6        Reviewed by Alex Christensen.
     7
     8        * platform/mac-wk1/TestExpectations:
     9        * storage/indexeddb/invalid-keys-expected.txt: Updated for new error message.
     10        * storage/indexeddb/optional-arguments-expected.txt: Remove results that expect IDBObjectStore.openKeyCursor() to be
     11          a thing. That method no longer exists in the spec and was already removed from the test.
     12
    1132015-12-11  Brady Eidson  <beidson@apple.com>
    214
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r193990 r193994  
    105105storage/indexeddb/open-db-private-browsing.html [ Failure ]
    106106storage/indexeddb/open-ordering.html [ Failure ]
    107 storage/indexeddb/optional-arguments.html [ Failure ]
    108107storage/indexeddb/properties-disabled-at-runtime.html [ Failure ]
    109108storage/indexeddb/setversion-blocked-by-versionchange-close.html [ Failure ]
  • trunk/LayoutTests/storage/indexeddb/invalid-keys-expected.txt

    r193892 r193994  
    1414PASS code is 0
    1515PASS ename is 'DataError'
    16 Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
     16Exception 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.
    1717Expecting exception from request = objectStore.put('value', null)
    1818PASS Exception was thrown.
  • trunk/LayoutTests/storage/indexeddb/optional-arguments-expected.txt

    r163963 r193994  
    5151verifyCursor():
    5252request = store.openCursor(3)
    53 cursor = request.result
    54 PASS cursor.direction is "next"
    55 PASS continues is 1
    56 
    57 verifyCursor():
    58 request = store.openKeyCursor()
    59 cursor = request.result
    60 PASS cursor.direction is "next"
    61 PASS continues is 5
    62 
    63 verifyCursor():
    64 request = store.openKeyCursor(null)
    65 cursor = request.result
    66 PASS cursor.direction is "next"
    67 PASS continues is 5
    68 
    69 verifyCursor():
    70 request = store.openKeyCursor(IDBKeyRange.lowerBound(4))
    71 cursor = request.result
    72 PASS cursor.direction is "next"
    73 PASS continues is 2
    74 
    75 verifyCursor():
    76 request = store.openKeyCursor(3)
    7753cursor = request.result
    7854PASS cursor.direction is "next"
  • trunk/Source/WebCore/ChangeLog

    r193991 r193994  
     12015-12-11  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: storage/indexeddb/optional-arguments.html fails.
     4        https://bugs.webkit.org/show_bug.cgi?id=152194
     5
     6        Reviewed by Alex Christensen.
     7
     8        No new tests (At least one failing test now passes).
     9
     10        * Modules/indexeddb/client/IDBCursorImpl.cpp:
     11        (WebCore::IDBClient::IDBCursor::continueFunction): Allow 'undefined' for the key.
     12       
     13        * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
     14        (WebCore::IDBClient::IDBObjectStore::add): Ditto.
     15        (WebCore::IDBClient::IDBObjectStore::put): Ditto.
     16
    1172015-12-11  Brady Eidson  <beidson@apple.com>
    218
  • trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp

    r193990 r193994  
    221221
    222222    DOMRequestState requestState(context);
    223     RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue);
     223    RefPtr<IDBKey> key;
     224    if (!keyValue.jsValue().isUndefined())
     225        key = scriptValueToIDBKey(&requestState, keyValue);
     226
    224227    continueFunction(key.get(), ec);
    225228}
  • trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp

    r193981 r193994  
    215215RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
    216216{
    217     auto idbKey = scriptValueToIDBKey(execState, key);
     217    RefPtr<IDBKey> idbKey;
     218    if (!key.isUndefined())
     219        idbKey = scriptValueToIDBKey(execState, key);
    218220    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
    219221}
     
    221223RefPtr<WebCore::IDBRequest> IDBObjectStore::put(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
    222224{
    223     auto idbKey = scriptValueToIDBKey(execState, key);
     225    RefPtr<IDBKey> idbKey;
     226    if (!key.isUndefined())
     227        idbKey = scriptValueToIDBKey(execState, key);
    224228    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
    225229}
Note: See TracChangeset for help on using the changeset viewer.