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 Tuesday, May 3, 2011 2:49:28 PM UTC
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 Tuesday, May 3, 2011 2:50:50 PM UTC
Created attachment 92068 [details] test case
Mark Pilgrim (Google)
Comment 2 Tuesday, May 3, 2011 3:26:31 PM UTC
Tony Chang
Comment 3 Wednesday, May 4, 2011 12:03:31 AM UTC
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 Wednesday, May 4, 2011 1:23:58 AM UTC
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 Wednesday, May 4, 2011 5:34:18 PM UTC
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 Wednesday, May 4, 2011 7:55:29 PM UTC
Comment on attachment 92073 [details] Patch Clearing flags on attachment: 92073 Committed r85770: <http://trac.webkit.org/changeset/85770>
WebKit Commit Bot
Comment 7 Wednesday, May 4, 2011 7:55:34 PM UTC
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 8 Wednesday, May 4, 2011 11:07:31 PM UTC
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.