Index: Source/platform/heap/ThreadState.h |
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h |
index 0eb1cb409f052fed3a00ef21cc41170831ab1960..b6405a8fee1d13baf529a6e6061a7341ef851050 100644 |
--- a/Source/platform/heap/ThreadState.h |
+++ b/Source/platform/heap/ThreadState.h |
@@ -84,10 +84,15 @@ enum ThreadAffinity { |
MainThreadOnly, |
}; |
+// FIXME: These forward declarations violate dependency rules. Remove them. |
+// Ideally we want to provide a USED_IN_MAIN_THREAD_ONLY(T) macro, which |
+// indicates that classes in T's hierarchy are used only by the main thread. |
class Node; |
-class CSSValue; |
+class NodeList; |
-template<typename T, bool derivesNode = WTF::IsSubclass<typename WTF::RemoveConst<T>::Type, Node>::value> struct DefaultThreadingTrait; |
+template<typename T, |
+ bool mainThreadOnly = WTF::IsSubclass<typename WTF::RemoveConst<T>::Type, Node>::value |
+ || WTF::IsSubclass<typename WTF::RemoveConst<T>::Type, NodeList>::value> struct DefaultThreadingTrait; |
template<typename T> |
struct DefaultThreadingTrait<T, false> { |