Chromium Code Reviews| Index: Source/platform/Supplementable.h |
| diff --git a/Source/platform/Supplementable.h b/Source/platform/Supplementable.h |
| index 650a204bd57cbbee12b7ebf1ad25f73e6e3b5791..31e776fa79c035b7c0273b23436d0a7eb6f60234 100644 |
| --- a/Source/platform/Supplementable.h |
| +++ b/Source/platform/Supplementable.h |
| @@ -119,6 +119,7 @@ template<> |
| class SupplementTracing<false> { |
| public: |
| virtual ~SupplementTracing() { } |
| + virtual void trace(Visitor*) { } |
| }; |
| template<typename T, bool isGarbageCollected = false> |
| @@ -143,7 +144,6 @@ public: |
| return host ? host->requireSupplement(key) : 0; |
| } |
| - virtual void trace(Visitor*) { } |
| virtual void willBeDestroyed() { } |
| // FIXME: Oilpan: Remove this callback once PersistentHeapSupplementable is removed again. |
| @@ -153,11 +153,22 @@ public: |
| template<typename T, bool> |
| class SupplementableTracing; |
| +// We have a trace method in the specializations of SupplementableTracing to |
| +// ensure we have the vtable at the first word of the object. However we don't |
| +// trace the m_supplements here, but in the partially specialized template |
| +// subclasses since we only want to trace it for garbage collected classes. |
| + |
| template<typename T> |
| -class SupplementableTracing<T, true> { }; |
| +class SupplementableTracing<T, true> { |
|
sof
2014/08/13 12:29:09
What value does this templated class add now?
zerny-chromium
2014/08/13 13:07:01
None really. I'll remove it. The reason it is/was
|
| +public: |
| + virtual void trace(Visitor*) { } |
| +}; |
| template<typename T> |
| -class SupplementableTracing<T, false> { }; |
| +class SupplementableTracing<T, false> { |
| +public: |
| + virtual void trace(Visitor*) { } |
| +}; |
| // Helper class for implementing Supplementable, HeapSupplementable, and |
| // PersistentHeapSupplementable. |
| @@ -190,12 +201,6 @@ public: |
| #endif |
| } |
| - // We have a trace method in the SupplementableBase class to ensure we have |
| - // the vtable at the first word of the object. However we don't trace the |
| - // m_supplements here, but in the partially specialized template subclasses |
| - // since we only want to trace it for garbage collected classes. |
| - virtual void trace(Visitor*) { } |
| - |
| void willBeDestroyed() |
| { |
| typedef typename SupplementableTraits<T, isGarbageCollected>::SupplementMap::iterator SupplementIterator; |