Bug 33005 - Move the call to DatabaseTracker::removeOpenDatabase() from Database::~Database() to Database::close() while preserving the order of all other calls
Summary: Move the call to DatabaseTracker::removeOpenDatabase() from Database::~Databa...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dumitru Daniliuc
Depends on:
Reported: 2009-12-28 18:45 PST by Dumitru Daniliuc
Modified: 2009-12-29 12:52 PST (History)
4 users (show)

See Also:

patch (5.71 KB, patch)
2009-12-28 19:54 PST, Dumitru Daniliuc
mjs: review+
dumi: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dumitru Daniliuc 2009-12-28 18:45:43 PST
We need to call DatabaseTracker::removeOpenDatabase() in Database::close() instead of Database::~Database(), because once we get to Database::~Database(), we cannot addref the object, schedule tasks on it on another thread, and so on. At the same time, we need to preserve the order in which things are done (such as, calling DatabaseTracker::addOpenDatabase() before actually opening the DB file), because the Chromium implementation was designed with certain assumptions in mind.
Comment 1 Dumitru Daniliuc 2009-12-28 19:54:11 PST
Created attachment 45585 [details]
Comment 2 WebKit Review Bot 2009-12-28 19:55:22 PST
style-queue ran check-webkit-style on attachment 45585 [details] without any errors.
Comment 3 Maciej Stachowiak 2009-12-28 20:18:57 PST
Comment on attachment 45585 [details]

Comment 4 Dumitru Daniliuc 2009-12-29 12:52:18 PST
Landed as r52631.

Thanks for the quick review, Maciej!