RESOLVED FIXED Bug 214583
Allow IndexedDB in third-party frames
https://bugs.webkit.org/show_bug.cgi?id=214583
Summary Allow IndexedDB in third-party frames
Sihui Liu
Reported 2020-07-20 19:53:00 PDT
Attachments
Patch (14.56 KB, patch)
2020-07-20 20:07 PDT, Sihui Liu
no flags
Patch (14.53 KB, patch)
2020-07-20 20:14 PDT, Sihui Liu
no flags
Patch (21.06 KB, patch)
2020-07-21 11:49 PDT, Sihui Liu
no flags
Patch (21.14 KB, patch)
2020-07-21 15:24 PDT, Sihui Liu
no flags
Patch (29.25 KB, patch)
2020-07-23 00:30 PDT, Sihui Liu
no flags
Sihui Liu
Comment 1 2020-07-20 20:07:50 PDT
Sihui Liu
Comment 2 2020-07-20 20:14:20 PDT
Sihui Liu
Comment 3 2020-07-21 11:49:58 PDT
Sihui Liu
Comment 4 2020-07-21 15:24:16 PDT
John Wilander
Comment 5 2020-07-21 15:36:53 PDT
Comment on attachment 404866 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404866&action=review Does this in-memory IDB line up with the IDB third-party ServiceWorkers get? If so, can we add a test to show that? Is this WK2-specific? I believe so since WK1 already has partitioned IDB afaik. If it is WK2-specific, please say so in the change log. Does partitioned IDB get cleared when IDB is cleared for the third-party, the partition (the first party), or both? Can we add a test for that? > Source/WebCore/ChangeLog:10 > + in-memory storage. Please add specifics on what the partitioning key is, i.e. origin (scheme+host+port), host, or registrable domain.
Sihui Liu
Comment 6 2020-07-21 16:32:51 PDT
(In reply to John Wilander from comment #5) > Comment on attachment 404866 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=404866&action=review > > Does this in-memory IDB line up with the IDB third-party ServiceWorkers get? > If so, can we add a test to show that? > Now IDB should have the same behavior as localStorage, so workers should have temporary storage too. Will try adding a test. > Is this WK2-specific? I believe so since WK1 already has partitioned IDB > afaik. If it is WK2-specific, please say so in the change log. > No, both wk1 and wk2 use the same logic: they didn't allow IDB on 3rd party frames. Check mac-wk1 bot behavior on updated test. > Does partitioned IDB get cleared when IDB is cleared for the third-party, > the partition (the first party), or both? Can we add a test for that? > Both. Will add a test. > > Source/WebCore/ChangeLog:10 > > + in-memory storage. > > Please add specifics on what the partitioning key is, i.e. origin > (scheme+host+port), host, or registrable domain. Sure.
Sihui Liu
Comment 7 2020-07-23 00:30:05 PDT
Geoffrey Garen
Comment 8 2020-07-23 12:56:55 PDT
Comment on attachment 405019 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405019&action=review r=me > Source/WebCore/Modules/indexeddb/IDBFactory.cpp:58 > + if (!context.securityOrigin()->canAccessDatabase(nullptr)) > return true; This check looks a little mysterious. It's nice that we're being consistent with LocalStorage here. Probably deserves some follow-up for both LocalStorage and IDB to make this check clearer.
Geoffrey Garen
Comment 9 2020-07-23 12:57:16 PDT
Seems like all review comments so far have been addressed, so I'll say r=me.
EWS
Comment 10 2020-07-23 14:21:26 PDT
Committed r264790: <https://trac.webkit.org/changeset/264790> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405019 [details].
Note You need to log in before you can comment on or make changes to this bug.