RESOLVED FIXED 74452
IndexedDB: Can't pass DOMStringList to IDBDatabase.transaction()
https://bugs.webkit.org/show_bug.cgi?id=74452
Summary IndexedDB: Can't pass DOMStringList to IDBDatabase.transaction()
Joshua Bell
Reported 2011-12-13 15:10:25 PST
Sample: indexedDB = window.indexedDB || window.webkitIndexedDB; indexedDB.open('db-test' + String(new Date)).onsuccess = function(e) { var db = e.target.result; db.setVersion('1').onsuccess = function(e) { var trans = e.target.result; trans.oncomplete = function() { test(db); }; }; }; function test(db) { var dsl = db.objectStoreNames; var trans = db.transaction(dsl); } Expected: db.transaction() succeeds with ["store"] as the scope Actual: INVALID_ACCESS_ERR is thrown
Attachments
Patch (4.66 KB, patch)
2011-12-13 15:30 PST, Joshua Bell
no flags
Patch (4.62 KB, patch)
2011-12-15 10:38 PST, Joshua Bell
no flags
Joshua Bell
Comment 1 2011-12-13 15:30:42 PST
Joshua Bell
Comment 2 2011-12-13 15:33:46 PST
The code generator spits out: if ( ... V8DOMStringList::HasInstance(args[0]) ... ) { ... } And later: EXCEPTION_BLOCK(RefPtr<DOMStringList>, storeNames, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, Mi ssingIsUndefined))); .. but v8ValueToWebCoreDOMStringList doesn't actually handle DOMStringList arguments. Dur..... This worked prior to M17 because bogus first arguments to IDBDatabase.transaction() were treated as [] (empty-array) which meant "use all stores", but that functionality was removed.
David Grogan
Comment 3 2011-12-13 15:34:17 PST
Comment on attachment 119097 [details] Patch IDB functionality LG. All yours, Adam.
Joshua Bell
Comment 4 2011-12-15 10:38:12 PST
Joshua Bell
Comment 5 2011-12-15 10:38:58 PST
Comment on attachment 119456 [details] Patch Just removed a blank line. (DOS line endings in the layout test blinded me.)
Adam Barth
Comment 6 2011-12-15 17:29:06 PST
Comment on attachment 119456 [details] Patch Looks great.
WebKit Review Bot
Comment 7 2011-12-15 20:23:30 PST
Comment on attachment 119456 [details] Patch Clearing flags on attachment: 119456 Committed r103018: <http://trac.webkit.org/changeset/103018>
WebKit Review Bot
Comment 8 2011-12-15 20:23:35 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.