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

Unified Diff: Source/platform/RefCountedSupplement.h

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/platform/RefCountedSupplement.h
diff --git a/Source/platform/RefCountedSupplement.h b/Source/platform/RefCountedSupplement.h
index 6de6a04aa9f74035ebb474cff106baf79f76fa2c..6613a3b8c9de86bf7eda5d2d7b167121aa9d4fb3 100644
--- a/Source/platform/RefCountedSupplement.h
+++ b/Source/platform/RefCountedSupplement.h
@@ -53,14 +53,14 @@ public:
RefPtr<ThisType> m_wrapped;
};
- static void provideTo(Supplementable<T>* host, const char* key, PassRefPtr<ThisType> supplement)
+ static void provideTo(Supplementable<T>& host, const char* key, PassRefPtr<ThisType> supplement)
{
- host->provideSupplement(key, adoptPtr(new Wrapper(supplement)));
+ host.provideSupplement(key, adoptPtr(new Wrapper(supplement)));
}
- static ThisType* from(Supplementable<T>* host, const char* key)
+ static ThisType* from(Supplementable<T>& host, const char* key)
{
- Supplement<T>* found = host->requireSupplement(key);
+ Supplement<T>* found = host.requireSupplement(key);
if (!found)
return 0;
ASSERT_WITH_SECURITY_IMPLICATION(found->isRefCountedWrapper());

Powered by Google App Engine
This is Rietveld 408576698