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

Unified Diff: Source/platform/Supplementable.h

Issue 323873007: Oilpan: Make LocalFrame PersistentHeapSupplementable and use transition types for its supplements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: non-oilpan build Created 6 years, 6 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/modules/webmidi/MIDIController.cpp ('k') | Source/platform/heap/Handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/Supplementable.h
diff --git a/Source/platform/Supplementable.h b/Source/platform/Supplementable.h
index 6a26e8cd580724ebbc2f187b0cac7af7237f0e47..aca4d42f2166f75d3b90efcf8a73a94db0229594 100644
--- a/Source/platform/Supplementable.h
+++ b/Source/platform/Supplementable.h
@@ -151,7 +151,7 @@ template<typename T, bool>
class SupplementableTracing;
template<typename T>
-class SupplementableTracing<T, true> : public GarbageCollectedMixin { };
+class SupplementableTracing<T, true> { };
template<typename T>
class SupplementableTracing<T, false> { };
@@ -195,6 +195,8 @@ public:
}
private:
+ // FIXME: Oilpan: Remove this ignore once PersistentHeapSupplementable is removed again.
+ GC_PLUGIN_IGNORE("")
typename SupplementableTraits<T, isGarbageCollected>::SupplementMap m_supplements;
#if !ASSERT_DISABLED
@@ -209,8 +211,25 @@ private:
template<typename T>
class HeapSupplement : public SupplementBase<T, true> { };
+// FIXME: Oilpan: Move GarbageCollectedMixin to SupplementableBase<T, true> once PersistentHeapSupplementable is removed again.
template<typename T>
-class HeapSupplementable : public SupplementableBase<T, true> { };
+class HeapSupplementable : public SupplementableBase<T, true>, public GarbageCollectedMixin { };
+
+template<typename T>
+class PersistentHeapSupplementable : public SupplementableBase<T, true> {
+public:
+ PersistentHeapSupplementable() : m_root(this) { }
+private:
+ class TraceDelegate : PersistentBase<ThreadLocalPersistents<AnyThread>, TraceDelegate> {
+ public:
+ TraceDelegate(PersistentHeapSupplementable* owner) : m_owner(owner) { }
+ void trace(Visitor* visitor) { m_owner->trace(visitor); }
+ private:
+ PersistentHeapSupplementable* m_owner;
+ };
+
+ TraceDelegate m_root;
+};
template<typename T>
class Supplement : public SupplementBase<T, false> { };
« no previous file with comments | « Source/modules/webmidi/MIDIController.cpp ('k') | Source/platform/heap/Handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698