Bug 187631 - IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins
Summary: IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-12 17:40 PDT by Sihui Liu
Modified: 2018-07-18 10:22 PDT (History)
11 users (show)

See Also:


Attachments
Patch (9.00 KB, patch)
2018-07-13 16:58 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (8.68 KB, patch)
2018-07-16 10:56 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2018-07-12 17:40:27 PDT
If we currently have 2 IDB databases:
IDB1: top level frame origin A with subframe origin A
IDB2: top level frame origin B with subframe origin A
IDB2 won't be deleted if user asks to delete all IDB databases for origin A. This is because we are managing IDB database deletion by their mainframe origin.
Comment 1 Radar WebKit Bug Importer 2018-07-13 06:46:24 PDT
<rdar://problem/42164227>
Comment 2 Sihui Liu 2018-07-13 16:58:39 PDT
Created attachment 345004 [details]
Patch
Comment 3 Brady Eidson 2018-07-16 10:40:44 PDT
Comment on attachment 345004 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345004&action=review

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:-136
> -    auto pid = [webView _webProcessIdentifier];
> -    if (pid)
> -        kill(pid, SIGKILL);

This seems unrelated. You mentioned you think it's the cause of some flakiness and there's a bug for it. We should implement it over in that bug.

It seems weird that we thought we needed to reset all processes but this change would stop doing that.
Comment 4 Sihui Liu 2018-07-16 10:56:34 PDT
Created attachment 345101 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2018-07-16 11:35:56 PDT
Comment on attachment 345101 [details]
Patch for landing

Clearing flags on attachment: 345101

Committed r233853: <https://trac.webkit.org/changeset/233853>
Comment 6 WebKit Commit Bot 2018-07-16 11:35:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Dawei Fenton (:realdawei) 2018-07-17 10:17:50 PDT
Jut  that after this patch (In reply to WebKit Commit Bot from comment #5)
> Comment on attachment 345101 [details]
> Patch for landing
> 
> Clearing flags on attachment: 345101
> 
> Committed r233853: <https://trac.webkit.org/changeset/233853>

Just want to note that after this patch we are getting a different failures at a different line number.  Not sure if this patch is dependent on 

https://bugs.webkit.org/show_bug.cgi?id=187066#c6 for a complete fix?


TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths
        
        /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:220
        Value of: [[NSFileManager defaultManager] fileExistsAtPath:fileIDBPath.get().path]
          Actual: true
        Expected: false
Comment 8 Sihui Liu 2018-07-18 09:36:53 PDT
(In reply to David Fenton (:realdawei) from comment #7)
> Jut  that after this patch (In reply to WebKit Commit Bot from comment #5)
> > Comment on attachment 345101 [details]
> > Patch for landing
> > 
> > Clearing flags on attachment: 345101
> > 
> > Committed r233853: <https://trac.webkit.org/changeset/233853>
> 
> Just want to note that after this patch we are getting a different failures
> at a different line number.  Not sure if this patch is dependent on 
> 
> https://bugs.webkit.org/show_bug.cgi?id=187066#c6 for a complete fix?
> 
> 
> TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths
>         
>        
> /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/
> WebKitCocoa/WebsiteDataStoreCustomPaths.mm:220
>         Value of: [[NSFileManager defaultManager]
> fileExistsAtPath:fileIDBPath.get().path]
>           Actual: true
>         Expected: false

Yes. With 187066's patch, the test should pass.
Comment 9 Dawei Fenton (:realdawei) 2018-07-18 10:22:08 PDT
(In reply to Sihui Liu from comment #8)
> (In reply to David Fenton (:realdawei) from comment #7)
> > Jut  that after this patch (In reply to WebKit Commit Bot from comment #5)
> > > Comment on attachment 345101 [details]
> > > Patch for landing
> > > 
> > > Clearing flags on attachment: 345101
> > > 
> > > Committed r233853: <https://trac.webkit.org/changeset/233853>
> > 
> > Just want to note that after this patch we are getting a different failures
> > at a different line number.  Not sure if this patch is dependent on 
> > 
> > https://bugs.webkit.org/show_bug.cgi?id=187066#c6 for a complete fix?
> > 
> > 
> > TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths
> >         
> >        
> > /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/
> > WebKitCocoa/WebsiteDataStoreCustomPaths.mm:220
> >         Value of: [[NSFileManager defaultManager]
> > fileExistsAtPath:fileIDBPath.get().path]
> >           Actual: true
> >         Expected: false
> 
> Yes. With 187066's patch, the test should pass.

Super! thanks.