Index: Source/platform/heap/GarbageCollected.h |
diff --git a/Source/platform/heap/GarbageCollected.h b/Source/platform/heap/GarbageCollected.h |
index ce920621a9261b50b4a0f51985a43131018340b0..5fe5388fcf849b7c7aebaa4f4aaa1e4800a0b04c 100644 |
--- a/Source/platform/heap/GarbageCollected.h |
+++ b/Source/platform/heap/GarbageCollected.h |
@@ -422,6 +422,21 @@ public: |
}; |
template <typename T> const bool NeedsAdjustAndMark<T, false>::value; |
+// TODO(sof): migrate to wtf/TypeTraits.h |
+template<typename T> |
+class IsFullyDefined { |
+ using TrueType = char; |
+ struct FalseType { |
+ char dummy[2]; |
+ }; |
+ |
+ template<typename U, size_t sz = sizeof(U)> static TrueType isSizeofKnown(U*); |
+ static FalseType isSizeofKnown(...); |
+ static T& t; |
+public: |
+ static const bool value = sizeof(TrueType) == sizeof(isSizeofKnown(&t)); |
+}; |
+ |
} // namespace blink |
#endif |