| Index: Source/heap/Heap.h
|
| diff --git a/Source/heap/Heap.h b/Source/heap/Heap.h
|
| index 945206ca0d4ad4a18707943d813f2d2de77299a5..5af32ee36c489de1516592c4d824447e34534e3f 100644
|
| --- a/Source/heap/Heap.h
|
| +++ b/Source/heap/Heap.h
|
| @@ -37,6 +37,7 @@
|
|
|
| #include "wtf/Assertions.h"
|
| #include "wtf/OwnPtr.h"
|
| +#include "wtf/RefCounted.h"
|
|
|
| #include <stdint.h>
|
|
|
| @@ -884,6 +885,15 @@ private:
|
| bool m_active;
|
| };
|
|
|
| +#if !ENABLE(OILPAN)
|
| +template<typename T>
|
| +class Dummy {
|
| +public:
|
| + Dummy() { }
|
| + ~Dummy() { }
|
| +};
|
| +#endif
|
| +
|
| // Base class for objects allocated in the Blink garbage-collected
|
| // heap.
|
| //
|
| @@ -907,6 +917,12 @@ class GarbageCollected {
|
| void* operator new[](size_t size);
|
| void operator delete[](void* p);
|
| public:
|
| +#if ENABLE(OILPAN)
|
| + typedef GarbageCollected<T> FromRefCounted;
|
| +#else
|
| + typedef RefCounted<T> FromRefCounted;
|
| +#endif
|
| +
|
| void* operator new(size_t size)
|
| {
|
| return Heap::allocate<T>(size);
|
| @@ -939,6 +955,15 @@ template<typename T>
|
| class GarbageCollectedFinalized : public GarbageCollected<T> {
|
| WTF_MAKE_NONCOPYABLE(GarbageCollectedFinalized);
|
|
|
| +public:
|
| +#if ENABLE(OILPAN)
|
| + typedef GarbageCollectedFinalized<T> FromRefCounted;
|
| + typedef GarbageCollectedFinalized<T> FromNoBase;
|
| +#else
|
| + typedef RefCounted<T> FromRefCounted;
|
| + typedef Dummy<T> FromNoBase;
|
| +#endif
|
| +
|
| protected:
|
| // Finalize is called when the object is freed from the heap. By
|
| // default finalization means calling the destructor on the
|
|
|