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 |