RESOLVED FIXED Bug 150149
Modern IDB: Handle versionchange events
https://bugs.webkit.org/show_bug.cgi?id=150149
Summary Modern IDB: Handle versionchange events
Brady Eidson
Reported 2015-10-14 16:14:50 PDT
Modern IDB: Add versionchange events Now that we can commit version changes (https://bugs.webkit.org/show_bug.cgi?id=150147), we can have open database connections that can get versionchange events.
Attachments
Patch v1 (14.36 KB, patch)
2015-10-16 11:44 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2015-10-16 11:44:39 PDT
Created attachment 263301 [details] Patch v1
Alex Christensen
Comment 2 2015-10-16 12:08:04 PDT
Comment on attachment 263301 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=263301&action=review > Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp:207 > + scriptExecutionContext()->eventQueue().enqueueEvent(adoptRef(&event.leakRef())); It seems like there might be a syntactically cleaner way to write.
Brady Eidson
Comment 3 2015-10-16 12:17:20 PDT
(In reply to comment #2) > Comment on attachment 263301 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=263301&action=review > > > Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp:207 > > + scriptExecutionContext()->eventQueue().enqueueEvent(adoptRef(&event.leakRef())); > > It seems like there might be a syntactically cleaner way to write. Sadly not right now - No clean way to automatically go from Ref to PassRefPtr. Alas - The ugliness will be removed when PassRefPtr is purged completely!
WebKit Commit Bot
Comment 4 2015-10-16 13:04:51 PDT
Comment on attachment 263301 [details] Patch v1 Clearing flags on attachment: 263301 Committed r191198: <http://trac.webkit.org/changeset/191198>
WebKit Commit Bot
Comment 5 2015-10-16 13:04:56 PDT
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 6 2015-10-16 14:31:38 PDT
One of the new tests is failing: --- /Volumes/Data/slave/elcapitan-release-tests-wk1/build/layout-test-results/storage/indexeddb/modern/versionchange-event-expected.txt +++ /Volumes/Data/slave/elcapitan-release-tests-wk1/build/layout-test-results/storage/indexeddb/modern/versionchange-event-actual.txt @@ -2,8 +2,8 @@ ALERT: Version change complete (firstPhase). Database version is now - 1 ALERT: Open success (secondPhase) ALERT: thirdPhase - Requested database connection with version 2 +ALERT: firstPhase connection versionchange event - old version: 1, new version: 2 ALERT: secondPhase connection versionchange event - old version: 1, new version: 2 -ALERT: firstPhase connection versionchange event - old version: 1, new version: 2 ALERT: Expected upgrade needed (thirdPhase) ALERT: Done This test:
Brady Eidson
Comment 8 2015-10-16 15:56:09 PDT
The event order actually does not matter. The test just needs to handle both orders. I probably have a fix, but need to test it first, but need to finish my build first. ETA: soon
Brady Eidson
Comment 9 2015-10-16 16:16:31 PDT
Ryan Haddad
Comment 10 2015-10-16 16:17:27 PDT
*** Bug 150259 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.