Index: Source/platform/heap/Heap.h |
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h |
index 239139434f5a54ca4023c309674c5c0dd6bf2e3b..18ed1dcb671bf71db601a6c085a5d6206f45986a 100644 |
--- a/Source/platform/heap/Heap.h |
+++ b/Source/platform/heap/Heap.h |
@@ -1094,13 +1094,10 @@ protected: |
// An exception to the use of sized heaps is made for class types that |
// require prompt finalization after a garbage collection. That is, their |
// instances have to be finalized early and cannot be delayed until lazy |
-// sweeping kicks in for their heap and page. The EAGERLY_SWEEP() |
+// sweeping kicks in for their heap and page. The EAGERLY_FINALIZE() |
// macro is used to declare a class (and its derived classes) as being |
-// in need of 'eager sweeping'. |
-// |
-// TODO(Oilpan): the notion of eagerly swept object is at least needed |
-// during the transition to enabling Oilpan always. Once passed, re-evaluate |
-// if there is a need to keep this facility. |
+// in need of eagerly finalized. Must be defined with 'public' visibility |
+// for a class. |
// |
template<typename T, typename Enabled = void> |
class HeapIndexTrait { |
@@ -1120,20 +1117,24 @@ public: |
// TODO(Oilpan): enable this macro when enabling lazy sweeping, non-Oilpan. |
#if ENABLE(OILPAN) |
-#define EAGERLY_SWEEP() typedef int IsEagerlySweptMarker |
+#define EAGERLY_FINALIZE() typedef int IsEagerlyFinalizedMarker |
+#define EAGERLY_FINALIZE_WILL_BE_REMOVED() |
#else |
-#define EAGERLY_SWEEP() |
+#define EAGERLY_FINALIZE() |
+// TODO(Oilpan): define in terms of Oilpan's EAGERLY_FINALIZE() once lazy |
+// sweeping is enabled non-Oilpan. |
+#define EAGERLY_FINALIZE_WILL_BE_REMOVED() |
#endif |
template<typename T> |
-struct IsEagerlySweptType { |
+struct IsEagerlyFinalizedType { |
private: |
typedef char YesType; |
struct NoType { |
char padding[8]; |
}; |
- template <typename U> static YesType checkMarker(typename U::IsEagerlySweptMarker*); |
+ template <typename U> static YesType checkMarker(typename U::IsEagerlyFinalizedMarker*); |
template <typename U> static NoType checkMarker(...); |
public: |
@@ -1141,7 +1142,7 @@ public: |
}; |
template<typename T> |
-class HeapIndexTrait<T, typename WTF::EnableIf<IsEagerlySweptType<T>::value>::Type> { |
+class HeapIndexTrait<T, typename WTF::EnableIf<IsEagerlyFinalizedType<T>::value>::Type> { |
haraken
2015/05/26 13:06:35
Just to confirm:
class A : GarbageCollected<A> {
|
public: |
static int heapIndexForObject(size_t) |
{ |