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

Unified Diff: Source/platform/Supplementable.h

Issue 463543002: Oilpan: Ensure that classes with virtual trace methods always have vtables for their left-most base… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
Index: Source/platform/Supplementable.h
diff --git a/Source/platform/Supplementable.h b/Source/platform/Supplementable.h
index 650a204bd57cbbee12b7ebf1ad25f73e6e3b5791..2d517397f17eaf39ea6aedc48257e583a5cd88f0 100644
--- a/Source/platform/Supplementable.h
+++ b/Source/platform/Supplementable.h
@@ -154,7 +154,14 @@ template<typename T, bool>
class SupplementableTracing;
template<typename T>
-class SupplementableTracing<T, true> { };
+class SupplementableTracing<T, true> {
+public:
+ // We have a trace method in SupplementableTracing<T, true> 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*) { }
+};
template<typename T>
class SupplementableTracing<T, false> { };
@@ -190,12 +197,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;

Powered by Google App Engine
This is Rietveld 408576698