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

Unified Diff: Source/modules/webdatabase/DatabaseManager.cpp

Issue 212133002: Remove manual ref()-deref() in DatabaseContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webdatabase/DatabaseManager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/DatabaseManager.cpp
diff --git a/Source/modules/webdatabase/DatabaseManager.cpp b/Source/modules/webdatabase/DatabaseManager.cpp
index 181eaf4df6dfed68d47ca2efa5bdb0fa80cd533c..710c1788b7689a3d7a0a20b63fecea9110623835 100644
--- a/Source/modules/webdatabase/DatabaseManager.cpp
+++ b/Source/modules/webdatabase/DatabaseManager.cpp
@@ -68,6 +68,10 @@ DatabaseManager::DatabaseManager()
ASSERT(m_server); // We should always have a server to work with.
}
+DatabaseManager::~DatabaseManager()
+{
+}
+
class DatabaseCreationCallbackTask FINAL : public ExecutionContextTask {
public:
static PassOwnPtr<DatabaseCreationCallbackTask> create(PassRefPtrWillBeRawPtr<Database> database, PassOwnPtr<DatabaseCallback> creationCallback)
@@ -107,8 +111,8 @@ DatabaseContext* DatabaseManager::databaseContextFor(ExecutionContext* context)
if (DatabaseContext* databaseContext = existingDatabaseContextFor(context))
return databaseContext;
// We don't need to hold a reference returned by DatabaseContext::create
- // because a DatabaseContext refers to itself internally. See
- // DataabseContext::create.
+ // because DatabaseContext::create calls registerDatabaseContext, and the
+ // DatabaseManager holds a reference.
return DatabaseContext::create(context).get();
}
« no previous file with comments | « Source/modules/webdatabase/DatabaseManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698