Bug 167281 - Database file not removed for origins after deleting all databases
Summary: Database file not removed for origins after deleting all databases
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 146589
  Show dependency treegraph
Reported: 2017-01-21 01:50 PST by Carlos Garcia Campos
Modified: 2017-01-22 23:30 PST (History)
4 users (show)

See Also:

Patch (3.36 KB, patch)
2017-01-21 01:55 PST, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-01-21 01:50:33 PST
I noticed this writing unit tests for new WebsiteData API in the GTK+ port. When DatabaseTracker::deleteDatabasesModifiedSince() is called with a min time, all databases for every origin are deleted. For each origin if all databases are removed DatabaseTracker::deleteOrigin() is called to remove also the origin database file. However, DatabaseTracker::deleteOrigin() returns early if the origin doesn't have databases and in this particular case it never has databases, because we have just removed them.
Comment 1 Carlos Garcia Campos 2017-01-21 01:55:20 PST
Created attachment 299428 [details]
Comment 2 Carlos Garcia Campos 2017-01-22 23:30:19 PST
Committed r211035: <http://trac.webkit.org/changeset/211035>