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

Unified Diff: Source/modules/performance/WorkerGlobalScopePerformance.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/performance/WorkerGlobalScopePerformance.cpp
diff --git a/Source/modules/performance/WorkerGlobalScopePerformance.cpp b/Source/modules/performance/WorkerGlobalScopePerformance.cpp
index 94939d9b9dbe15f78d08e05662a0f1df30c3f3f2..1ecd5be35c3ea0087b287beb279a106a4b2eceb0 100644
--- a/Source/modules/performance/WorkerGlobalScopePerformance.cpp
+++ b/Source/modules/performance/WorkerGlobalScopePerformance.cpp
@@ -50,19 +50,19 @@ const char* WorkerGlobalScopePerformance::supplementName()
return "WorkerGlobalScopePerformance";
}
-WorkerGlobalScopePerformance* WorkerGlobalScopePerformance::from(WorkerGlobalScope* context)
+WorkerGlobalScopePerformance& WorkerGlobalScopePerformance::from(WorkerGlobalScope& context)
{
WorkerGlobalScopePerformance* supplement = static_cast<WorkerGlobalScopePerformance*>(WorkerSupplement::from(context, supplementName()));
if (!supplement) {
supplement = new WorkerGlobalScopePerformance();
provideTo(context, supplementName(), adoptPtr(supplement));
}
- return supplement;
+ return *supplement;
}
-WorkerPerformance* WorkerGlobalScopePerformance::performance(WorkerGlobalScope* context)
+WorkerPerformance* WorkerGlobalScopePerformance::performance(WorkerGlobalScope& context)
{
- return from(context)->performance();
+ return from(context).performance();
}
WorkerPerformance* WorkerGlobalScopePerformance::performance()

Powered by Google App Engine
This is Rietveld 408576698