RESOLVED FIXED Bug 107754
IndexedDB: Remove IDBUpgradeNeededEvent, merge with IDBVersionChangeEvent
https://bugs.webkit.org/show_bug.cgi?id=107754
Summary IndexedDB: Remove IDBUpgradeNeededEvent, merge with IDBVersionChangeEvent
Joshua Bell
Reported 2013-01-23 15:56:28 PST
IndexedDB: Remove IDBUpgradeNeededEvent, merge with IDBVersionChangeEvent
Attachments
Patch (46.18 KB, patch)
2013-01-24 10:06 PST, Joshua Bell
no flags
Patch (47.99 KB, patch)
2013-01-24 12:19 PST, Joshua Bell
no flags
Patch (44.63 KB, patch)
2013-01-24 12:21 PST, Joshua Bell
no flags
Joshua Bell
Comment 1 2013-01-24 10:06:46 PST
Joshua Bell
Comment 2 2013-01-24 10:07:59 PST
alecflett@ - can you take a look?
Alec Flett
Comment 3 2013-01-24 10:51:54 PST
Comment on attachment 184522 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184522&action=review > Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp:69 > + RefPtr<IDBAny> oldVersionAny = oldVersion ? IDBAny::create(oldVersion) : IDBAny::createNull(); Isn't there an Invalid Version constant somewhere, so this can be (oldVersion != InvalidVersion) ? IDBAny::create(oldVersion) : IDBAny::createNull() ? > Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp:70 > + RefPtr<IDBAny> newVersionAny = m_version ? IDBAny::create(m_version) : IDBAny::createNull(); ditto > Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp:109 > + enqueueEvent(IDBVersionChangeEvent::create(IDBAny::create(oldVersion), IDBAny::create(m_version), eventNames().upgradeneededEvent)); this doesn't need the same oldVersion ? ... : null; checks from above?
Joshua Bell
Comment 4 2013-01-24 11:22:54 PST
Comment on attachment 184522 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184522&action=review >> Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp:69 >> + RefPtr<IDBAny> oldVersionAny = oldVersion ? IDBAny::create(oldVersion) : IDBAny::createNull(); > > Isn't there an Invalid Version constant somewhere, so this can be (oldVersion != InvalidVersion) ? IDBAny::create(oldVersion) : IDBAny::createNull() ? Yeah, I'll switch these to checking against IDBDatabaseMetadata::DefaultIntVersion (which is 0). >> Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp:109 >> + enqueueEvent(IDBVersionChangeEvent::create(IDBAny::create(oldVersion), IDBAny::create(m_version), eventNames().upgradeneededEvent)); > > this doesn't need the same oldVersion ? ... : null; checks from above? I didn't change the behavior of upgradeneeded at all, just the interface. So whatever integers were used before will be passed straight through. http://crbug.com/153121 captures the issue that when we fire "upgradeneeded" (regardless of the event interface type), the oldVersion is a number. Fixing that requires back-end to front-end plumbing, but is independent of this patch.
Joshua Bell
Comment 5 2013-01-24 12:19:49 PST
Joshua Bell
Comment 6 2013-01-24 12:21:11 PST
Joshua Bell
Comment 7 2013-01-24 12:21:32 PST
tony@ - can you review?
WebKit Review Bot
Comment 8 2013-01-24 15:45:11 PST
Comment on attachment 184553 [details] Patch Clearing flags on attachment: 184553 Committed r140741: <http://trac.webkit.org/changeset/140741>
WebKit Review Bot
Comment 9 2013-01-24 15:45:15 PST
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 10 2013-01-27 18:15:26 PST
Re-opened since this is blocked by bug 108044
Joshua Bell
Comment 11 2013-01-28 16:23:58 PST
Note You need to log in before you can comment on or make changes to this bug.