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

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

Issue 1999343002: Unify and provide one IsGarbageCollectedType<T> implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 4 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
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 9f0b0abe70acc4f4963865aaa4f778f01ca750b6..432b9d7c1885e01acfe50a1def69a37b9ffaf6c3 100644
--- a/third_party/WebKit/Source/platform/heap/Handle.h
+++ b/third_party/WebKit/Source/platform/heap/Handle.h
@@ -41,7 +41,6 @@
#include "wtf/Allocator.h"
#include "wtf/Atomics.h"
#include "wtf/HashFunctions.h"
-#include "wtf/TypeTraits.h"
#if defined(LEAK_SANITIZER)
#include "wtf/LeakAnnotations.h"
@@ -1159,34 +1158,6 @@ struct IsWeak<blink::WeakMember<T>> {
static const bool value = true;
};
-// 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);
- using StorageType = T*;
-
- static StorageType wrap(T* value) { return value; }
- static T* unwrap(const StorageType& value) { return value; }
-};
-
-template<typename T>
-struct PointerParamStorageTraits<T*, true> {
- STATIC_ONLY(PointerParamStorageTraits);
- using StorageType = blink::CrossThreadPersistent<T>;
-
- static StorageType wrap(T* value) { return value; }
- static T* unwrap(const StorageType& value) { return value.get(); }
-};
-
-template<typename T>
-struct ParamStorageTraits<T*> : public PointerParamStorageTraits<T*, blink::IsGarbageCollectedType<T>::value> {
- STATIC_ONLY(ParamStorageTraits);
-};
-
template<typename T>
struct ParamStorageTraits<blink::WeakPersistentThisPointer<T>> {
STATIC_ONLY(ParamStorageTraits);
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GarbageCollected.h ('k') | third_party/WebKit/Source/platform/heap/HeapAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698