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

Side by Side Diff: third_party/WebKit/Source/platform/heap/Handle.h

Issue 1474213002: [PartitionAlloc] Annotate common Blink types for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ctti
Patch Set: Mark template specialisations as WTF_EXPORT Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 } 1054 }
1055 1055
1056 template<typename T> T* adoptPtrWillBeNoop(T* ptr) 1056 template<typename T> T* adoptPtrWillBeNoop(T* ptr)
1057 { 1057 {
1058 static const bool isGarbageCollected = IsGarbageCollectedType<T>::value; 1058 static const bool isGarbageCollected = IsGarbageCollectedType<T>::value;
1059 static_assert(isGarbageCollected, "T needs to be a garbage collected type.") ; 1059 static_assert(isGarbageCollected, "T needs to be a garbage collected type.") ;
1060 return ptr; 1060 return ptr;
1061 } 1061 }
1062 1062
1063 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) // do nothing when oilpan is ena bled. 1063 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) // do nothing when oilpan is ena bled.
1064 #define USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(type)
1064 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 1065 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
1065 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 1066 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
1066 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 1067 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
1067 1068
1068 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \ 1069 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \
1069 static type* name = (new Persistent<type>(arguments))->get(); 1070 static type* name = (new Persistent<type>(arguments))->get();
1070 1071
1071 #else // !ENABLE(OILPAN) 1072 #else // !ENABLE(OILPAN)
1072 1073
1073 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr 1074 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 #define WillBeHeapLinkedStack WTF::LinkedStack 1128 #define WillBeHeapLinkedStack WTF::LinkedStack
1128 #define PersistentHeapHashMapWillBeHeapHashMap blink::PersistentHeapHashMap 1129 #define PersistentHeapHashMapWillBeHeapHashMap blink::PersistentHeapHashMap
1129 #define PersistentHeapHashSetWillBeHeapHashSet blink::PersistentHeapHashSet 1130 #define PersistentHeapHashSetWillBeHeapHashSet blink::PersistentHeapHashSet
1130 #define PersistentHeapDequeWillBeHeapDeque blink::PersistentHeapDeque 1131 #define PersistentHeapDequeWillBeHeapDeque blink::PersistentHeapDeque
1131 #define PersistentHeapVectorWillBeHeapVector blink::PersistentHeapVector 1132 #define PersistentHeapVectorWillBeHeapVector blink::PersistentHeapVector
1132 1133
1133 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); } 1134 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); }
1134 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); } 1135 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); }
1135 1136
1136 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) USING_FAST_MALLOC(type) 1137 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) USING_FAST_MALLOC(type)
1138 #define USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(type) USING_FAST_MALLOC _WITH_TYPE_NAME(type)
1137 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ 1139 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \
1138 public: \ 1140 public: \
1139 ~type(); \ 1141 ~type(); \
1140 private: 1142 private:
1141 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \ 1143 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \
1142 public: \ 1144 public: \
1143 virtual ~type(); \ 1145 virtual ~type(); \
1144 private: 1146 private:
1145 1147
1146 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ 1148 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C rossThread)WeakPersistent. 1507 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C rossThread)WeakPersistent.
1506 static T* unwrap(const StorageType& value) { return value.get(); } 1508 static T* unwrap(const StorageType& value) { return value.get(); }
1507 }; 1509 };
1508 1510
1509 template<typename T> 1511 template<typename T>
1510 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; 1512 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete;
1511 1513
1512 } // namespace WTF 1514 } // namespace WTF
1513 1515
1514 #endif 1516 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/SharedBuffer.cpp ('k') | third_party/WebKit/Source/wtf/Allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698