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

Unified Diff: third_party/WebKit/Source/platform/heap/Handle.h

Issue 1923183002: Add support for IsGarbageCollectedType<void> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: auto-Rebase Created 4 years, 8 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
Index: third_party/WebKit/Source/platform/heap/Handle.h
diff --git a/third_party/WebKit/Source/platform/heap/Handle.h b/third_party/WebKit/Source/platform/heap/Handle.h
index 92b181229db6a81815f0b7f755fddc0a354561aa..a82c488d74dca7d0c326c9b4c6fc5a5b10b807a8 100644
--- a/third_party/WebKit/Source/platform/heap/Handle.h
+++ b/third_party/WebKit/Source/platform/heap/Handle.h
@@ -1159,10 +1159,11 @@ template<typename T> inline T* getPtr(const blink::Persistent<T>& p)
// For wtf/Functional.h
template<typename T, bool isGarbageCollected> struct PointerParamStorageTraits;
+// The condition of 'T must be fully defined' (except for void) is checked in
+// blink::IsGarbageCollectedType<T>::value.
template<typename T>
struct PointerParamStorageTraits<T*, false> {
STATIC_ONLY(PointerParamStorageTraits);
- static_assert(sizeof(T), "T must be fully defined");
using StorageType = T*;
static StorageType wrap(T* value) { return value; }
@@ -1172,7 +1173,6 @@ struct PointerParamStorageTraits<T*, false> {
template<typename T>
struct PointerParamStorageTraits<T*, true> {
STATIC_ONLY(PointerParamStorageTraits);
- static_assert(sizeof(T), "T must be fully defined");
using StorageType = blink::CrossThreadPersistent<T>;
static StorageType wrap(T* value) { return value; }
@@ -1182,7 +1182,6 @@ struct PointerParamStorageTraits<T*, true> {
template<typename T>
struct ParamStorageTraits<T*> : public PointerParamStorageTraits<T*, blink::IsGarbageCollectedType<T>::value> {
STATIC_ONLY(ParamStorageTraits);
- static_assert(sizeof(T), "T must be fully defined");
};
template<typename T>
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GarbageCollected.h ('k') | third_party/WebKit/Source/wtf/Functional.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698