RESOLVED FIXED 60022
IndexedDB open (database) should fail if name is null
https://bugs.webkit.org/show_bug.cgi?id=60022
Summary IndexedDB open (database) should fail if name is null
Mark Pilgrim (Google)
Reported 2011-05-03 06:49:28 PDT
Original test: http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_open_empty_db.html?force=1 Expected result: webkitIndexedDB.open(null, 'foo') should throw a webkitIDBDatabaseException.NON_TRANSIENT_ERR Actual result: no exception thrown Citation: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBFactory-open states that name can not be null. Mozilla throws NON_TRANSIENT_ERR in response to this condition.
Attachments
test case (1.49 KB, text/html)
2011-05-03 06:50 PDT, Mark Pilgrim (Google)
no flags
Patch (5.70 KB, patch)
2011-05-03 07:26 PDT, Mark Pilgrim (Google)
no flags
Mark Pilgrim (Google)
Comment 1 2011-05-03 06:50:50 PDT
Created attachment 92068 [details] test case
Mark Pilgrim (Google)
Comment 2 2011-05-03 07:26:31 PDT
Tony Chang
Comment 3 2011-05-03 16:03:31 PDT
I'm happy to r+ this patch (seems simple enough), but it would be nice if someone actually working on indexeddb took a look.
David Grogan
Comment 4 2011-05-03 17:23:58 PDT
Comment on attachment 92073 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92073&action=review unofficial r+ > Source/WebCore/storage/IDBFactory.cpp:71 > + if (name.isNull()) { Mark, do you want to file a w3 bug saying that the spec should be updated to reflect throwing NON_TRANSIENT_ERR in this case? > Source/WebCore/storage/IDBFactory.idl:31 > + [CallWith=ScriptExecutionContext] IDBRequest open(in [ConvertNullToNullString] DOMString name) Tony, do you know if [ConvertNullToNullString] has downsides that might have caused it to be omitted initially?
Tony Chang
Comment 5 2011-05-04 09:34:18 PDT
Comment on attachment 92073 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92073&action=review >> Source/WebCore/storage/IDBFactory.idl:31 >> + [CallWith=ScriptExecutionContext] IDBRequest open(in [ConvertNullToNullString] DOMString name) > > Tony, do you know if [ConvertNullToNullString] has downsides that might have caused it to be omitted initially? I don't know of any downsides. I suspect it was just an oversight.
WebKit Commit Bot
Comment 6 2011-05-04 11:55:29 PDT
Comment on attachment 92073 [details] Patch Clearing flags on attachment: 92073 Committed r85770: <http://trac.webkit.org/changeset/85770>
WebKit Commit Bot
Comment 7 2011-05-04 11:55:34 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 8 2011-05-04 15:07:31 PDT
http://trac.webkit.org/changeset/85770 might have broken GTK Linux 64-bit Debug The following tests are not passing: http/tests/navigation/response204.html
Note You need to log in before you can comment on or make changes to this bug.