Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Issue 212133002: Remove manual ref()-deref() in DatabaseContext. (Closed)

Created:
6 years, 9 months ago by tkent
Modified:
6 years, 9 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews
Visibility:
Public.

Description

Remove manual ref()-deref() in DatabaseContext. DatabaseManager holds DatabaseContext references instead. - We need to move DatabaseManager::registerDatabaseContext call from the constructor to the factory because registerDatabaseContext now increments the reference counter of a DatabaseContext and we can't update the reference counter in the constructor. - We move DatabaseManager::unregisterDatabaseContext call from stopDatabases to contextDestroyed in order to match to deref() in the old code. - We don't need m_isRegistered any longer because contextDestroyed is called just once. stopDatabases can be called twice. - We need to move ~DatabaseManager implementation to DatabaseManager.cpp because we add RefPtr<DatabaseContext> in a member of DatabaseManager and ~DatabaseManager needs a complete definition of DatabaseContext. BUG=347902 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170027

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -14 lines) Patch
M Source/modules/webdatabase/DatabaseContext.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/modules/webdatabase/DatabaseContext.cpp View 4 chunks +3 lines, -9 lines 0 comments Download
M Source/modules/webdatabase/DatabaseManager.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/modules/webdatabase/DatabaseManager.cpp View 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
tkent
Please review this.
6 years, 9 months ago (2014-03-26 05:42:16 UTC) #1
haraken
LGTM. This CL makes the ownership of DatabaseContext much clearer.
6 years, 9 months ago (2014-03-26 05:54:13 UTC) #2
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-26 05:55:15 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/212133002/1
6 years, 9 months ago (2014-03-26 05:55:21 UTC) #4
commit-bot: I haz the power
6 years, 9 months ago (2014-03-26 06:42:39 UTC) #5
Message was sent while issue was closed.
Change committed as 170027

Powered by Google App Engine
This is Rietveld 408576698