Bug 160463 - Removing IndexedDB WebsiteData can fail for some users
Summary: Removing IndexedDB WebsiteData can fail for some users
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
Keywords: InRadar
Depends on:
Blocks: 149117
  Show dependency treegraph
Reported: 2016-08-02 13:29 PDT by Brady Eidson
Modified: 2016-08-02 22:53 PDT (History)
4 users (show)

See Also:

Patch v1 (6.83 KB, patch)
2016-08-02 13:38 PDT, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-08-02 13:29:26 PDT
Removing IndexeDB WebsiteData can fail for some users

If somebody removed website data in an earlier version of WebKit that only deleted sqlite3 files, the directories for the databases remain with -wal and -shm files.

Further attempts to fully clear the directories will refuse to run, leaving behind those files.

Those users will still see that site as taking up data in Safari preferences, and can't get out of that state without hitting the filesystem directly.

Let's help them.
Comment 1 Brady Eidson 2016-08-02 13:30:01 PDT
Comment 2 Brady Eidson 2016-08-02 13:38:42 PDT
Created attachment 285132 [details]
Patch v1
Comment 3 Brady Eidson 2016-08-02 14:29:43 PDT
Comment 4 Darin Adler 2016-08-02 22:53:06 PDT
Comment on attachment 285132 [details]
Patch v1

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

> Source/WebCore/platform/sql/SQLiteFileSystem.cpp:96
> +    // If any of the wal or shm files remain after the delete attempt, the overall delete operation failed.

Should just say "any of the files"; "any of the wal or shm files" doesn’t match the code below that also looks at the main file!