Chromium Code Reviews| 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 812 #define WillBePersistentHeapListHashSet WebCore::PersistentHeapListHashSet | 812 #define WillBePersistentHeapListHashSet WebCore::PersistentHeapListHashSet |
| 813 #define WillBeHeapVector WebCore::HeapVector | 813 #define WillBeHeapVector WebCore::HeapVector |
| 814 #define WillBePersistentHeapVector WebCore::PersistentHeapVector | 814 #define WillBePersistentHeapVector WebCore::PersistentHeapVector |
| 815 #define WillBeHeapDeque WebCore::HeapDeque | 815 #define WillBeHeapDeque WebCore::HeapDeque |
| 816 #define WillBePersistentHeapDeque WebCore::PersistentHeapDeque | 816 #define WillBePersistentHeapDeque WebCore::PersistentHeapDeque |
| 817 #define WillBeHeapHashCountedSet WebCore::HeapHashCountedSet | 817 #define WillBeHeapHashCountedSet WebCore::HeapHashCountedSet |
| 818 #define WillBePersistentHeapHashCountedSet WebCore::PersistentHeapHashCountedSet | 818 #define WillBePersistentHeapHashCountedSet WebCore::PersistentHeapHashCountedSet |
| 819 #define WillBeGarbageCollectedMixin WebCore::GarbageCollectedMixin | 819 #define WillBeGarbageCollectedMixin WebCore::GarbageCollectedMixin |
| 820 #define WillBeHeapSupplement WebCore::HeapSupplement | 820 #define WillBeHeapSupplement WebCore::HeapSupplement |
| 821 #define WillBeHeapSupplementable WebCore::HeapSupplementable | 821 #define WillBeHeapSupplementable WebCore::HeapSupplementable |
| 822 #define WillBePersistentHeapSupplementable WebCore::PersistentHeapSupplementable | |
| 822 #define WillBeHeapTerminatedArray WebCore::HeapTerminatedArray | 823 #define WillBeHeapTerminatedArray WebCore::HeapTerminatedArray |
| 823 #define WillBeHeapTerminatedArrayBuilder WebCore::HeapTerminatedArrayBuilder | 824 #define WillBeHeapTerminatedArrayBuilder WebCore::HeapTerminatedArrayBuilder |
| 824 #define WillBeHeapLinkedStack WebCore::HeapLinkedStack | 825 #define WillBeHeapLinkedStack WebCore::HeapLinkedStack |
| 826 #define PersistentHeapHashSetWillBeHeapHashSet WebCore::HeapHashSet | |
|
haraken
2014/06/10 12:04:34
I think you won't need this.
| |
| 825 | 827 |
| 826 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) | 828 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) |
| 827 { | 829 { |
| 828 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <typename WTF::RemoveConst<T>::Type, RefCountedGarbageCollected>::value; | 830 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <typename WTF::RemoveConst<T>::Type, RefCountedGarbageCollected>::value; |
| 829 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename WTF::R emoveConst<T>::Type, RefCounted>::value; | 831 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename WTF::R emoveConst<T>::Type, RefCounted>::value; |
| 830 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected); | 832 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected); |
| 831 COMPILE_ASSERT(notRefCounted, youMustAdopt); | 833 COMPILE_ASSERT(notRefCounted, youMustAdopt); |
| 832 return PassRefPtrWillBeRawPtr<T>(ptr); | 834 return PassRefPtrWillBeRawPtr<T>(ptr); |
| 833 } | 835 } |
| 834 | 836 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 915 #define WillBePersistentListHeapHashSet WTF::ListHashSet | 917 #define WillBePersistentListHeapHashSet WTF::ListHashSet |
| 916 #define WillBeHeapVector WTF::Vector | 918 #define WillBeHeapVector WTF::Vector |
| 917 #define WillBePersistentHeapVector WTF::Vector | 919 #define WillBePersistentHeapVector WTF::Vector |
| 918 #define WillBeHeapDeque WTF::Deque | 920 #define WillBeHeapDeque WTF::Deque |
| 919 #define WillBePersistentHeapDeque WTF::Deque | 921 #define WillBePersistentHeapDeque WTF::Deque |
| 920 #define WillBeHeapHeapCountedSet WTF::HeapCountedSet | 922 #define WillBeHeapHeapCountedSet WTF::HeapCountedSet |
| 921 #define WillBePersistentHeapHeapCountedSet WTF::HeapCountedSet | 923 #define WillBePersistentHeapHeapCountedSet WTF::HeapCountedSet |
| 922 #define WillBeGarbageCollectedMixin WebCore::DummyBase<void> | 924 #define WillBeGarbageCollectedMixin WebCore::DummyBase<void> |
| 923 #define WillBeHeapSupplement WebCore::Supplement | 925 #define WillBeHeapSupplement WebCore::Supplement |
| 924 #define WillBeHeapSupplementable WebCore::Supplementable | 926 #define WillBeHeapSupplementable WebCore::Supplementable |
| 927 #define WillBePersistentHeapSupplementable WebCore::Supplementable | |
| 925 #define WillBeHeapTerminatedArray WTF::TerminatedArray | 928 #define WillBeHeapTerminatedArray WTF::TerminatedArray |
| 926 #define WillBeHeapTerminatedArrayBuilder WTF::TerminatedArrayBuilder | 929 #define WillBeHeapTerminatedArrayBuilder WTF::TerminatedArrayBuilder |
| 927 #define WillBeHeapLinkedStack WTF::LinkedStack | 930 #define WillBeHeapLinkedStack WTF::LinkedStack |
| 931 #define PersistentHeapHashSetWillBeHeapHashSet WebCore::PersistentHeapHashSet | |
| 928 | 932 |
| 929 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); } | 933 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); } |
| 930 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo llected(T* ptr) { return adoptRef(ptr); } | 934 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo llected(T* ptr) { return adoptRef(ptr); } |
| 931 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeThreadSafeRefCounte dGarbageCollected(T* ptr) { return adoptRef(ptr); } | 935 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeThreadSafeRefCounte dGarbageCollected(T* ptr) { return adoptRef(ptr); } |
| 932 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); } | 936 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); } |
| 933 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeRefCountedGarbageCo llected(T* ptr) { return adoptPtr(ptr); } | 937 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeRefCountedGarbageCo llected(T* ptr) { return adoptPtr(ptr); } |
| 934 | 938 |
| 935 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED | 939 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED |
| 936 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ | 940 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ |
| 937 public: \ | 941 public: \ |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1179 template<typename T> struct ParamStorageTraits<RawPtr<T> > { | 1183 template<typename T> struct ParamStorageTraits<RawPtr<T> > { |
| 1180 typedef WebCore::CrossThreadPersistent<T> StorageType; | 1184 typedef WebCore::CrossThreadPersistent<T> StorageType; |
| 1181 | 1185 |
| 1182 static StorageType wrap(RawPtr<T> value) { return value.get(); } | 1186 static StorageType wrap(RawPtr<T> value) { return value.get(); } |
| 1183 static T* unwrap(const StorageType& value) { return value.get(); } | 1187 static T* unwrap(const StorageType& value) { return value.get(); } |
| 1184 }; | 1188 }; |
| 1185 | 1189 |
| 1186 } // namespace WTF | 1190 } // namespace WTF |
| 1187 | 1191 |
| 1188 #endif | 1192 #endif |
| OLD | NEW |