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

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: rebase 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
« no previous file with comments | « Source/platform/LifecycleContext.h ('k') | no next file » | 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 7229740b1d60a14697fefaab2305fdc4bf1eb0b2..47cbf407b3f4663e3183d5ee7649a60664d4448f 100644
--- a/Source/platform/Supplementable.h
+++ b/Source/platform/Supplementable.h
@@ -119,6 +119,7 @@ template<>
class SupplementTracing<false> {
public:
virtual ~SupplementTracing() { }
+ virtual void trace(Visitor*) { }
};
template<typename T, bool isGarbageCollected = false>
@@ -143,26 +144,16 @@ public:
return host ? host->requireSupplement(key) : 0;
}
- virtual void trace(Visitor*) { }
virtual void willBeDestroyed() { }
// FIXME: Oilpan: Remove this callback once PersistentHeapSupplementable is removed again.
virtual void persistentHostHasBeenDestroyed() { }
};
-template<typename T, bool>
-class SupplementableTracing;
-
-template<typename T>
-class SupplementableTracing<T, true> { };
-
-template<typename T>
-class SupplementableTracing<T, false> { };
-
// Helper class for implementing Supplementable, HeapSupplementable, and
// PersistentHeapSupplementable.
template<typename T, bool isGarbageCollected = false>
-class SupplementableBase : public SupplementableTracing<T, isGarbageCollected> {
+class SupplementableBase {
public:
void provideSupplement(const char* key, typename SupplementableTraits<T, isGarbageCollected>::SupplementArgumentType supplement)
{
« no previous file with comments | « Source/platform/LifecycleContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698