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

Unified Diff: third_party/WebKit/Source/wtf/TypeTraits.h

Issue 1568213002: DEFINE_STATIC_LOCAL(): assert against illegal use of GCed types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/Source/wtf/StdLibExtras.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/TypeTraits.h
diff --git a/third_party/WebKit/Source/wtf/TypeTraits.h b/third_party/WebKit/Source/wtf/TypeTraits.h
index 1d938b5ce4c18f34536e59786a52cff0669085a0..002ec4fd6e6cfdf5a29c27cb7c7866052b3b6082 100644
--- a/third_party/WebKit/Source/wtf/TypeTraits.h
+++ b/third_party/WebKit/Source/wtf/TypeTraits.h
@@ -228,6 +228,19 @@ public:
};
template<typename T>
+class IsPersistentReferenceType {
+ typedef char YesType;
+ typedef struct NoType {
+ char padding[8];
+ } NoType;
+
+ template <typename U> static YesType checkPersistentReferenceType(typename U::IsPersistentReferenceTypeMarker*);
+ template <typename U> static NoType checkPersistentReferenceType(...);
+public:
+ static const bool value = (sizeof(YesType) == sizeof(checkPersistentReferenceType<T>(nullptr)));
+};
+
+template<typename T>
class IsPointerToGarbageCollectedType {
public:
static const bool value = false;
« no previous file with comments | « third_party/WebKit/Source/wtf/StdLibExtras.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698