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

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

Issue 282263006: Oilpan: remove consts when checking GC-class convertibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/heap/ThreadState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Visitor.h
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h
index e92e89f3377d914597c9a7c4703f5518cef2384d..63773aca74b22d2fdb8bb30839a01b5e2fda5e47 100644
--- a/Source/platform/heap/Visitor.h
+++ b/Source/platform/heap/Visitor.h
@@ -130,7 +130,7 @@ struct FinalizerTraitImpl<T, false> {
// behavior is not desired.
template<typename T>
struct FinalizerTrait {
- static const bool nonTrivialFinalizer = WTF::IsSubclassOfTemplate<T, GarbageCollectedFinalized>::value;
+ static const bool nonTrivialFinalizer = WTF::IsSubclassOfTemplate<typename WTF::RemoveConst<T>::Type, GarbageCollectedFinalized>::value;
static void finalize(void* obj) { FinalizerTraitImpl<T, nonTrivialFinalizer>::finalize(obj); }
};
@@ -146,7 +146,7 @@ template<typename T> struct GCInfoTrait;
template<typename T> class GarbageCollected;
class GarbageCollectedMixin;
-template<typename T, bool = WTF::IsSubclassOfTemplate<T, GarbageCollected>::value> class NeedsAdjustAndMark;
+template<typename T, bool = WTF::IsSubclassOfTemplate<typename WTF::RemoveConst<T>::Type, GarbageCollected>::value> class NeedsAdjustAndMark;
template<typename T>
class NeedsAdjustAndMark<T, true> {
@@ -157,7 +157,7 @@ public:
template<typename T>
class NeedsAdjustAndMark<T, false> {
public:
- static const bool value = WTF::IsSubclass<T, GarbageCollectedMixin>::value;
+ static const bool value = WTF::IsSubclass<typename WTF::RemoveConst<T>::Type, GarbageCollectedMixin>::value;
};
template<typename T, bool = NeedsAdjustAndMark<T>::value> class DefaultTraceTrait;
@@ -669,7 +669,7 @@ public:
public: \
virtual void adjustAndMark(WebCore::Visitor* visitor) const OVERRIDE \
{ \
- typedef WTF::IsSubclassOfTemplate<TYPE, WebCore::GarbageCollected> IsSubclassOfGarbageCollected; \
+ typedef WTF::IsSubclassOfTemplate<typename WTF::RemoveConst<TYPE>::Type, WebCore::GarbageCollected> IsSubclassOfGarbageCollected; \
COMPILE_ASSERT(IsSubclassOfGarbageCollected::value, OnlyGarbageCollectedObjectsCanHaveGarbageCollectedMixins); \
visitor->mark(this, &WebCore::TraceTrait<TYPE>::trace); \
} \
@@ -713,7 +713,7 @@ struct GCInfoAtBase {
};
template<typename T> class GarbageCollected;
-template<typename T, bool = WTF::IsSubclassOfTemplate<T, GarbageCollected>::value> struct GetGarbageCollectedBase;
+template<typename T, bool = WTF::IsSubclassOfTemplate<typename WTF::RemoveConst<T>::Type, GarbageCollected>::value> struct GetGarbageCollectedBase;
template<typename T>
struct GetGarbageCollectedBase<T, true> {
« no previous file with comments | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698