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

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: Remove redundancy from macro 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 } 1053 }
1054 1054
1055 template<typename T> T* adoptPtrWillBeNoop(T* ptr) 1055 template<typename T> T* adoptPtrWillBeNoop(T* ptr)
1056 { 1056 {
1057 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename std::r emove_const<T>::type, RefCounted>::value; 1057 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename std::r emove_const<T>::type, RefCounted>::value;
1058 static_assert(notRefCounted, "you must adopt"); 1058 static_assert(notRefCounted, "you must adopt");
1059 return ptr; 1059 return ptr;
1060 } 1060 }
1061 1061
1062 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) // do nothing when oilpan is ena bled. 1062 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) // do nothing when oilpan is ena bled.
1063 #define USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(type)
1063 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 1064 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
1064 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 1065 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
1065 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 1066 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
1066 1067
1067 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \ 1068 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \
1068 static type* name = (new Persistent<type>(arguments))->get(); 1069 static type* name = (new Persistent<type>(arguments))->get();
1069 1070
1070 #else // !ENABLE(OILPAN) 1071 #else // !ENABLE(OILPAN)
1071 1072
1072 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr 1073 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 #define WillBeHeapLinkedStack WTF::LinkedStack 1127 #define WillBeHeapLinkedStack WTF::LinkedStack
1127 #define PersistentHeapHashMapWillBeHeapHashMap blink::PersistentHeapHashMap 1128 #define PersistentHeapHashMapWillBeHeapHashMap blink::PersistentHeapHashMap
1128 #define PersistentHeapHashSetWillBeHeapHashSet blink::PersistentHeapHashSet 1129 #define PersistentHeapHashSetWillBeHeapHashSet blink::PersistentHeapHashSet
1129 #define PersistentHeapDequeWillBeHeapDeque blink::PersistentHeapDeque 1130 #define PersistentHeapDequeWillBeHeapDeque blink::PersistentHeapDeque
1130 #define PersistentHeapVectorWillBeHeapVector blink::PersistentHeapVector 1131 #define PersistentHeapVectorWillBeHeapVector blink::PersistentHeapVector
1131 1132
1132 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); } 1133 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); }
1133 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); } 1134 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); }
1134 1135
1135 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) USING_FAST_MALLOC(type) 1136 #define USING_FAST_MALLOC_WILL_BE_REMOVED(type) USING_FAST_MALLOC(type)
1137 #define USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(type) USING_FAST_MALLOC _WITH_TYPE_NAME(type)
1136 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ 1138 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \
1137 public: \ 1139 public: \
1138 ~type(); \ 1140 ~type(); \
1139 private: 1141 private:
1140 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \ 1142 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \
1141 public: \ 1143 public: \
1142 virtual ~type(); \ 1144 virtual ~type(); \
1143 private: 1145 private:
1144 1146
1145 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ 1147 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C rossThread)WeakPersistent. 1506 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C rossThread)WeakPersistent.
1505 static T* unwrap(const StorageType& value) { return value.get(); } 1507 static T* unwrap(const StorageType& value) { return value.get(); }
1506 }; 1508 };
1507 1509
1508 template<typename T> 1510 template<typename T>
1509 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; 1511 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete;
1510 1512
1511 } // namespace WTF 1513 } // namespace WTF
1512 1514
1513 #endif 1515 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698