The W3C Web Storage spec says that for localStorage.key() (http://dev.w3.org/html5/webstorage/#dom-storage-key) null should be returned when the value passed in is equal to or greater than what localStorage.length returns (and the same obviously goes for sessionStorage). But if you do ``localStorage.key(localStorage.length)`` in Safari 4.0.2, instead of getting null you get ``Error: INDEX_SIZE_ERR: DOM Exception 1``.
Created attachment 34517 [details] Patch v1
Sending LayoutTests/ChangeLog Sending LayoutTests/storage/domstorage/localstorage/simple-usage-expected.txt Sending LayoutTests/storage/domstorage/localstorage/simple-usage.html Sending LayoutTests/storage/domstorage/sessionstorage/simple-usage-expected.txt Sending LayoutTests/storage/domstorage/sessionstorage/simple-usage.html Sending WebCore/ChangeLog Sending WebCore/bindings/js/JSStorageCustom.cpp Sending WebCore/bindings/v8/custom/V8StorageCustom.cpp Sending WebCore/storage/Storage.cpp Sending WebCore/storage/Storage.h Sending WebCore/storage/Storage.idl Sending WebCore/storage/StorageArea.h Sending WebCore/storage/StorageAreaImpl.cpp Sending WebCore/storage/StorageAreaImpl.h Sending WebCore/storage/StorageMap.cpp Sending WebCore/storage/StorageMap.h Transmitting file data ................ Committed revision 47020. http://trac.webkit.org/changeset/47020