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

Unified Diff: Source/platform/RefCountedSupplement.h

Issue 255983003: Oilpan: Move all supplements of Page, Document, and WorkerClients to the managed heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 6 years, 8 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 76d4da2c5c979884313929d86ed2316a7f11438a..9a06008da6ab3f21a86a8f71cc98d1742e3090aa 100644
--- a/Source/platform/RefCountedSupplement.h
+++ b/Source/platform/RefCountedSupplement.h
@@ -32,6 +32,7 @@
namespace WebCore {
+#if !ENABLE(OILPAN)
template<class T, class S>
class RefCountedSupplement : public RefCounted<S> {
public:
@@ -69,40 +70,7 @@ public:
return static_cast<Wrapper*>(found)->wrapped();
}
};
-
-// FIXME: Oilpan: Consider moving all supplements to the managed heap (as HeapSupplement) and removing this wrapper.
-template<typename T, typename S>
-class RefCountedGarbageCollectedSupplement : public RefCountedGarbageCollected<S> {
-public:
- typedef RefCountedGarbageCollectedSupplement<T, S> ThisType;
-
- virtual ~RefCountedGarbageCollectedSupplement() { }
-
- class Wrapper FINAL : public Supplement<T> {
- public:
- explicit Wrapper(ThisType* wrapped) : m_wrapped(wrapped) { }
- virtual ~Wrapper() { }
- ThisType* wrapped() const { return m_wrapped; }
- virtual void trace(Visitor* visitor) OVERRIDE { visitor->trace(m_wrapped); }
- private:
- Member<ThisType> m_wrapped;
- };
-
- static void provideTo(Supplementable<T>& host, const char* key, ThisType* supplement)
- {
- host.provideSupplement(key, adoptPtr(new Wrapper(supplement)));
- }
-
- static ThisType* from(Supplementable<T>& host, const char* key)
- {
- Supplement<T>* found = static_cast<Supplement<T>*>(host.requireSupplement(key));
- if (!found)
- return 0;
- return static_cast<Wrapper*>(found)->wrapped();
- }
-
- virtual void trace(Visitor*) = 0;
-};
+#endif
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698