Bug 33005

Summary: Move the call to DatabaseTracker::removeOpenDatabase() from Database::~Database() to Database::close() while preserving the order of all other calls
Product: WebKit Reporter: Dumitru Daniliuc <dumi>
Component: New BugsAssignee: Dumitru Daniliuc <dumi>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, michaeln, pam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch mjs: review+, dumi: commit-queue-

Dumitru Daniliuc
Reported 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.
Attachments
patch (5.71 KB, patch)
2009-12-28 19:54 PST, Dumitru Daniliuc
mjs: review+
dumi: commit-queue-
Dumitru Daniliuc
Comment 1 2009-12-28 19:54:11 PST
WebKit Review Bot
Comment 2 2009-12-28 19:55:22 PST
style-queue ran check-webkit-style on attachment 45585 [details] without any errors.
Maciej Stachowiak
Comment 3 2009-12-28 20:18:57 PST
Comment on attachment 45585 [details] patch r=me
Dumitru Daniliuc
Comment 4 2009-12-29 12:52:18 PST
Landed as r52631. Thanks for the quick review, Maciej!
Note You need to log in before you can comment on or make changes to this bug.