IndexedDB: Support Date objects as keys.
Created attachment 76777 [details] Patch
Comment on attachment 76777 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=76777&action=review > LayoutTests/storage/indexeddb/objectstore-basics.html:165 > + result = evalAndLog("store.add({x: new Date(), y: 'value'}, 'key')"); Maybe test passing in a specific date and verify it comes out as expected? > WebCore/storage/IDBKey.h:43 > + IDBKey* idbKey = new IDBKey(); Adopt it right away and store it in a ref ptr. .release() in the return
(In reply to comment #2) > (From update of attachment 76777 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=76777&action=review > > > LayoutTests/storage/indexeddb/objectstore-basics.html:165 > > + result = evalAndLog("store.add({x: new Date(), y: 'value'}, 'key')"); > > Maybe test passing in a specific date and verify it comes out as expected? Done (but doing it for the case where we use a Date as a key explicitly.) > > > WebCore/storage/IDBKey.h:43 > > + IDBKey* idbKey = new IDBKey(); > > Adopt it right away and store it in a ref ptr. .release() in the return Done.
Created attachment 76868 [details] Patch
Comment on attachment 76868 [details] Patch r=me
Committed r74266: <http://trac.webkit.org/changeset/74266>