OLD | NEW |
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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 #define WillBeHeapTerminatedArray blink::HeapTerminatedArray | 1040 #define WillBeHeapTerminatedArray blink::HeapTerminatedArray |
1041 #define WillBeHeapTerminatedArrayBuilder blink::HeapTerminatedArrayBuilder | 1041 #define WillBeHeapTerminatedArrayBuilder blink::HeapTerminatedArrayBuilder |
1042 #define WillBeHeapLinkedStack blink::HeapLinkedStack | 1042 #define WillBeHeapLinkedStack blink::HeapLinkedStack |
1043 #define PersistentHeapHashMapWillBeHeapHashMap blink::HeapHashMap | 1043 #define PersistentHeapHashMapWillBeHeapHashMap blink::HeapHashMap |
1044 #define PersistentHeapHashSetWillBeHeapHashSet blink::HeapHashSet | 1044 #define PersistentHeapHashSetWillBeHeapHashSet blink::HeapHashSet |
1045 #define PersistentHeapDequeWillBeHeapDeque blink::HeapDeque | 1045 #define PersistentHeapDequeWillBeHeapDeque blink::HeapDeque |
1046 #define PersistentHeapVectorWillBeHeapVector blink::HeapVector | 1046 #define PersistentHeapVectorWillBeHeapVector blink::HeapVector |
1047 | 1047 |
1048 template<typename T> T* adoptRefWillBeNoop(T* ptr) | 1048 template<typename T> T* adoptRefWillBeNoop(T* ptr) |
1049 { | 1049 { |
1050 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename WTF::R
emoveConst<T>::Type, RefCounted>::value; | 1050 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename std::r
emove_const<T>::type, RefCounted>::value; |
1051 static_assert(notRefCounted, "you must adopt"); | 1051 static_assert(notRefCounted, "you must adopt"); |
1052 return ptr; | 1052 return ptr; |
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 WTF::R
emoveConst<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 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing | 1063 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing |
1064 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing | 1064 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing |
1065 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing | 1065 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing |
1066 | 1066 |
1067 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \ | 1067 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \ |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C
rossThread)WeakPersistent. | 1504 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C
rossThread)WeakPersistent. |
1505 static T* unwrap(const StorageType& value) { return value.get(); } | 1505 static T* unwrap(const StorageType& value) { return value.get(); } |
1506 }; | 1506 }; |
1507 | 1507 |
1508 template<typename T> | 1508 template<typename T> |
1509 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1509 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
1510 | 1510 |
1511 } // namespace WTF | 1511 } // namespace WTF |
1512 | 1512 |
1513 #endif | 1513 #endif |
OLD | NEW |