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

Unified Diff: Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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
Index: Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
diff --git a/Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp b/Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
index 04fcbae3082725084b6fe780aaba1fa6a19f4794..51ae8f8779f19f92192123c71768e9982d718324 100644
--- a/Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
+++ b/Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
@@ -48,19 +48,19 @@ const char* WorkerGlobalScopeIndexedDatabase::supplementName()
return "WorkerGlobalScopeIndexedDatabase";
}
-WorkerGlobalScopeIndexedDatabase* WorkerGlobalScopeIndexedDatabase::from(WorkerSupplementable* context)
+WorkerGlobalScopeIndexedDatabase& WorkerGlobalScopeIndexedDatabase::from(WorkerSupplementable& context)
{
WorkerGlobalScopeIndexedDatabase* supplement = static_cast<WorkerGlobalScopeIndexedDatabase*>(WorkerSupplement::from(context, supplementName()));
if (!supplement) {
supplement = new WorkerGlobalScopeIndexedDatabase();
provideTo(context, supplementName(), adoptPtr(supplement));
}
- return supplement;
+ return *supplement;
}
-IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(WorkerSupplementable* context)
+IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB(WorkerSupplementable& context)
{
- return from(context)->indexedDB();
+ return from(context).indexedDB();
}
IDBFactory* WorkerGlobalScopeIndexedDatabase::indexedDB()

Powered by Google App Engine
This is Rietveld 408576698