RESOLVED FIXED 71313
IndexedDB: Object stores not persisting between sessions
https://bugs.webkit.org/show_bug.cgi?id=71313
Summary IndexedDB: Object stores not persisting between sessions
Joshua Bell
Reported 2011-11-01 13:15:23 PDT
IndexedDB: Object stores not persisting between sessions
Attachments
Patch (1.98 KB, patch)
2011-11-01 13:19 PDT, Joshua Bell
no flags
Patch (2.02 KB, patch)
2011-11-01 14:57 PDT, Joshua Bell
no flags
persistence layout test (doesn't detect bug) (2.15 KB, text/html)
2011-11-01 15:12 PDT, Joshua Bell
no flags
Joshua Bell
Comment 1 2011-11-01 13:19:15 PDT
jochen
Comment 2 2011-11-01 13:24:47 PDT
LGTM, thanks
Tony Chang
Comment 3 2011-11-01 13:39:27 PDT
Comment on attachment 113207 [details] Patch Is it possible to write a layout test for this?
David Grogan
Comment 4 2011-11-01 13:46:38 PDT
Comment on attachment 113207 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113207&action=review > Source/WebCore/storage/IDBDatabaseBackendImpl.cpp:112 > + ASSERT(success == (m_id != InvalidId)); Would the following work? The only advantage is that it skips the call to loadObjectStores that I just asked you about IRL. if (success) { loadObjectStores(); return; } if (!m_backingStore->createIDB.....) ASSERT_NOT_REACHED();
Joshua Bell
Comment 5 2011-11-01 14:57:49 PDT
Joshua Bell
Comment 6 2011-11-01 15:12:04 PDT
Created attachment 113235 [details] persistence layout test (doesn't detect bug) Logically, the attached layout test should work, but it doesn't detect the bug. The IDBDatabaseBackendImpl is apparently persisting in the IDBFactoryBackendImpl's m_databaseBackendMap across the page load. If there's a way to clear out the script execution context, we can try that. Suggestions welcome. We should investigate why the impl isn't being torn down as promptly as expected.
jochen
Comment 7 2011-11-01 15:33:10 PDT
(In reply to comment #6) > Created an attachment (id=113235) [details] > persistence layout test (doesn't detect bug) > > Logically, the attached layout test should work, but it doesn't detect the bug. The IDBDatabaseBackendImpl is apparently persisting in the IDBFactoryBackendImpl's m_databaseBackendMap across the page load. If there's a way to clear out the script execution context, we can try that. Suggestions welcome. You could redirect through another security origin, but that would require an http test (localhost -> 127.0.0.01 -> localhost) > > We should investigate why the impl isn't being torn down as promptly as expected. I also wonder whether it's possible to invoke open() or createObjectStore() after calling close on the IDBDatabase
Joshua Bell
Comment 8 2011-11-03 09:20:51 PDT
(In reply to comment #3) > (From update of attachment 113207 [details]) > Is it possible to write a layout test for this? tony@ - I believe the answer is "no" without further work, which we should do, but IMHO without holding up this fix. The issue was caught by a Chromium pyauto test (see http://crbug.com/102537), which is how it was detected (but missed on the webkit side). r?/cq?
Tony Chang
Comment 9 2011-11-03 10:27:36 PDT
Comment on attachment 113227 [details] Patch OK, but some things to investigate. (In reply to comment #7) > (In reply to comment #6) > > Created an attachment (id=113235) [details] [details] > > persistence layout test (doesn't detect bug) > > > > Logically, the attached layout test should work, but it doesn't detect the bug. The IDBDatabaseBackendImpl is apparently persisting in the IDBFactoryBackendImpl's m_databaseBackendMap across the page load. If there's a way to clear out the script execution context, we can try that. Suggestions welcome. > > You could redirect through another security origin, but that would require an http test (localhost -> 127.0.0.01 -> localhost) Does it work to navigate to a different file:/// URL and back? > > We should investigate why the impl isn't being torn down as promptly as expected. > > I also wonder whether it's possible to invoke open() or createObjectStore() after calling close on the IDBDatabase You should also feel free to add methods to layoutTestController to enable more testing.
WebKit Review Bot
Comment 10 2011-11-03 10:46:18 PDT
Comment on attachment 113227 [details] Patch Clearing flags on attachment: 113227 Committed r99218: <http://trac.webkit.org/changeset/99218>
WebKit Review Bot
Comment 11 2011-11-03 10:46:23 PDT
All reviewed patches have been landed. Closing bug.
Joshua Bell
Comment 12 2011-12-14 10:29:45 PST
(In reply to comment #6) > Created an attachment (id=113235) [details] > persistence layout test (doesn't detect bug) > > Logically, the attached layout test should work, but it doesn't detect the bug. The IDBDatabaseBackendImpl is apparently persisting in the IDBFactoryBackendImpl's m_databaseBackendMap across the page load. If there's a way to clear out the script execution context, we can try that. Suggestions welcome. > > We should investigate why the impl isn't being torn down as promptly as expected. FYI, this specific issue should be fixed with: https://bugs.webkit.org/show_bug.cgi?id=72066
Note You need to log in before you can comment on or make changes to this bug.