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

Unified Diff: Source/platform/heap/Heap.h

Issue 1150863003: Oilpan: rename EAGERLY_SWEEP() as EAGERLY_FINALIZED(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « Source/platform/LifecycleObserver.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
{
« no previous file with comments | « Source/platform/LifecycleObserver.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698