| 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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 // transition type be unqualified, would dually not work for template | 765 // transition type be unqualified, would dually not work for template |
| 766 // aliases. So, slightly unfortunately, fall back/down to the lowest | 766 // aliases. So, slightly unfortunately, fall back/down to the lowest |
| 767 // commmon denominator of using CPP macros only. | 767 // commmon denominator of using CPP macros only. |
| 768 #if ENABLE(OILPAN) | 768 #if ENABLE(OILPAN) |
| 769 #define PassRefPtrWillBeRawPtr WTF::RawPtr | 769 #define PassRefPtrWillBeRawPtr WTF::RawPtr |
| 770 #define RefCountedWillBeGarbageCollected WebCore::GarbageCollected | 770 #define RefCountedWillBeGarbageCollected WebCore::GarbageCollected |
| 771 #define RefCountedWillBeGarbageCollectedFinalized WebCore::GarbageCollectedFinal
ized | 771 #define RefCountedWillBeGarbageCollectedFinalized WebCore::GarbageCollectedFinal
ized |
| 772 #define RefCountedWillBeRefCountedGarbageCollected WebCore::RefCountedGarbageCol
lected | 772 #define RefCountedWillBeRefCountedGarbageCollected WebCore::RefCountedGarbageCol
lected |
| 773 #define ThreadSafeRefCountedWillBeGarbageCollected WebCore::GarbageCollected | 773 #define ThreadSafeRefCountedWillBeGarbageCollected WebCore::GarbageCollected |
| 774 #define ThreadSafeRefCountedWillBeGarbageCollectedFinalized WebCore::GarbageColl
ectedFinalized | 774 #define ThreadSafeRefCountedWillBeGarbageCollectedFinalized WebCore::GarbageColl
ectedFinalized |
| 775 #define ThreadSafeRefCountedWillBeThreadSafeRefCountedGarbageCollected WebCore::
ThreadSafeRefCountedGarbageCollected |
| 775 #define TreeSharedWillBeRefCountedGarbageCollected WebCore::RefCountedGarbageCol
lected | 776 #define TreeSharedWillBeRefCountedGarbageCollected WebCore::RefCountedGarbageCol
lected |
| 776 #define PersistentWillBeMember WebCore::Member | 777 #define PersistentWillBeMember WebCore::Member |
| 777 #define RefPtrWillBePersistent WebCore::Persistent | 778 #define RefPtrWillBePersistent WebCore::Persistent |
| 778 #define RefPtrWillBeRawPtr WTF::RawPtr | 779 #define RefPtrWillBeRawPtr WTF::RawPtr |
| 779 #define RefPtrWillBeMember WebCore::Member | 780 #define RefPtrWillBeMember WebCore::Member |
| 780 #define RefPtrWillBeCrossThreadPersistent WebCore::CrossThreadPersistent | 781 #define RefPtrWillBeCrossThreadPersistent WebCore::CrossThreadPersistent |
| 781 #define RawPtrWillBeMember WebCore::Member | 782 #define RawPtrWillBeMember WebCore::Member |
| 782 #define RawPtrWillBeWeakMember WebCore::WeakMember | 783 #define RawPtrWillBeWeakMember WebCore::WeakMember |
| 783 #define OwnPtrWillBeMember WebCore::Member | 784 #define OwnPtrWillBeMember WebCore::Member |
| 784 #define OwnPtrWillBePersistent WebCore::Persistent | 785 #define OwnPtrWillBePersistent WebCore::Persistent |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 return PassRefPtrWillBeRawPtr<T>(ptr); | 819 return PassRefPtrWillBeRawPtr<T>(ptr); |
| 819 } | 820 } |
| 820 | 821 |
| 821 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo
llected(T* ptr) | 822 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo
llected(T* ptr) |
| 822 { | 823 { |
| 823 static const bool isRefCountedGarbageCollected = WTF::IsSubclassOfTemplate<T
, RefCountedGarbageCollected>::value; | 824 static const bool isRefCountedGarbageCollected = WTF::IsSubclassOfTemplate<T
, RefCountedGarbageCollected>::value; |
| 824 COMPILE_ASSERT(isRefCountedGarbageCollected, useAdoptRefWillBeNoop); | 825 COMPILE_ASSERT(isRefCountedGarbageCollected, useAdoptRefWillBeNoop); |
| 825 return PassRefPtrWillBeRawPtr<T>(adoptRefCountedGarbageCollected(ptr)); | 826 return PassRefPtrWillBeRawPtr<T>(adoptRefCountedGarbageCollected(ptr)); |
| 826 } | 827 } |
| 827 | 828 |
| 829 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeThreadSafeRefCounte
dGarbageCollected(T* ptr) |
| 830 { |
| 831 static const bool isThreadSafeRefCountedGarbageCollected = WTF::IsSubclassOf
Template<T, ThreadSafeRefCountedGarbageCollected>::value; |
| 832 COMPILE_ASSERT(isThreadSafeRefCountedGarbageCollected, useAdoptRefWillBeNoop
); |
| 833 return PassRefPtrWillBeRawPtr<T>(adoptRefCountedGarbageCollected(ptr)); |
| 834 } |
| 835 |
| 828 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) | 836 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) |
| 829 { | 837 { |
| 830 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate
<T, RefCountedGarbageCollected>::value; | 838 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate
<T, RefCountedGarbageCollected>::value; |
| 831 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>:
:value; | 839 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>:
:value; |
| 832 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou
ntedGarbageCollected); | 840 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou
ntedGarbageCollected); |
| 833 COMPILE_ASSERT(notRefCounted, youMustAdopt); | 841 COMPILE_ASSERT(notRefCounted, youMustAdopt); |
| 834 return PassOwnPtrWillBeRawPtr<T>(ptr); | 842 return PassOwnPtrWillBeRawPtr<T>(ptr); |
| 835 } | 843 } |
| 836 | 844 |
| 837 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED // do nothing when oilpan is ena
bled. | 845 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED // do nothing when oilpan is ena
bled. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 850 DummyBase() { } | 858 DummyBase() { } |
| 851 ~DummyBase() { } | 859 ~DummyBase() { } |
| 852 }; | 860 }; |
| 853 | 861 |
| 854 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr | 862 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr |
| 855 #define RefCountedWillBeGarbageCollected WTF::RefCounted | 863 #define RefCountedWillBeGarbageCollected WTF::RefCounted |
| 856 #define RefCountedWillBeGarbageCollectedFinalized WTF::RefCounted | 864 #define RefCountedWillBeGarbageCollectedFinalized WTF::RefCounted |
| 857 #define RefCountedWillBeRefCountedGarbageCollected WTF::RefCounted | 865 #define RefCountedWillBeRefCountedGarbageCollected WTF::RefCounted |
| 858 #define ThreadSafeRefCountedWillBeGarbageCollected WTF::ThreadSafeRefCounted | 866 #define ThreadSafeRefCountedWillBeGarbageCollected WTF::ThreadSafeRefCounted |
| 859 #define ThreadSafeRefCountedWillBeGarbageCollectedFinalized WTF::ThreadSafeRefCo
unted | 867 #define ThreadSafeRefCountedWillBeGarbageCollectedFinalized WTF::ThreadSafeRefCo
unted |
| 868 #define ThreadSafeRefCountedWillBeThreadSafeRefCountedGarbageCollected WTF::Thre
adSafeRefCounted |
| 860 #define TreeSharedWillBeRefCountedGarbageCollected WebCore::TreeShared | 869 #define TreeSharedWillBeRefCountedGarbageCollected WebCore::TreeShared |
| 861 #define PersistentWillBeMember WebCore::Persistent | 870 #define PersistentWillBeMember WebCore::Persistent |
| 862 #define RefPtrWillBePersistent WTF::RefPtr | 871 #define RefPtrWillBePersistent WTF::RefPtr |
| 863 #define RefPtrWillBeRawPtr WTF::RefPtr | 872 #define RefPtrWillBeRawPtr WTF::RefPtr |
| 864 #define RefPtrWillBeMember WTF::RefPtr | 873 #define RefPtrWillBeMember WTF::RefPtr |
| 865 #define RefPtrWillBeCrossThreadPersistent WTF::RefPtr | 874 #define RefPtrWillBeCrossThreadPersistent WTF::RefPtr |
| 866 #define RawPtrWillBeMember WTF::RawPtr | 875 #define RawPtrWillBeMember WTF::RawPtr |
| 867 #define RawPtrWillBeWeakMember WTF::RawPtr | 876 #define RawPtrWillBeWeakMember WTF::RawPtr |
| 868 #define OwnPtrWillBeMember WTF::OwnPtr | 877 #define OwnPtrWillBeMember WTF::OwnPtr |
| 869 #define OwnPtrWillBePersistent WTF::OwnPtr | 878 #define OwnPtrWillBePersistent WTF::OwnPtr |
| (...skipping 19 matching lines...) Expand all Loading... |
| 889 #define WillBePersistentHeapHeapCountedSet WTF::HeapCountedSet | 898 #define WillBePersistentHeapHeapCountedSet WTF::HeapCountedSet |
| 890 #define WillBeGarbageCollectedMixin WebCore::DummyBase<void> | 899 #define WillBeGarbageCollectedMixin WebCore::DummyBase<void> |
| 891 #define WillBeHeapSupplement WebCore::Supplement | 900 #define WillBeHeapSupplement WebCore::Supplement |
| 892 #define WillBeHeapSupplementable WebCore::Supplementable | 901 #define WillBeHeapSupplementable WebCore::Supplementable |
| 893 #define WillBeHeapTerminatedArray WTF::TerminatedArray | 902 #define WillBeHeapTerminatedArray WTF::TerminatedArray |
| 894 #define WillBeHeapTerminatedArrayBuilder WTF::TerminatedArrayBuilder | 903 #define WillBeHeapTerminatedArrayBuilder WTF::TerminatedArrayBuilder |
| 895 #define WillBeHeapLinkedStack WTF::LinkedStack | 904 #define WillBeHeapLinkedStack WTF::LinkedStack |
| 896 | 905 |
| 897 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu
rn adoptRef(ptr); } | 906 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu
rn adoptRef(ptr); } |
| 898 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo
llected(T* ptr) { return adoptRef(ptr); } | 907 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo
llected(T* ptr) { return adoptRef(ptr); } |
| 908 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeThreadSafeRefCounte
dGarbageCollected(T* ptr) { return adoptRef(ptr); } |
| 899 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu
rn adoptPtr(ptr); } | 909 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu
rn adoptPtr(ptr); } |
| 900 | 910 |
| 901 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED | 911 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED |
| 902 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ | 912 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ |
| 903 public: \ | 913 public: \ |
| 904 ~type(); \ | 914 ~type(); \ |
| 905 private: | 915 private: |
| 906 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \ | 916 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \ |
| 907 public: \ | 917 public: \ |
| 908 virtual ~type(); \ | 918 virtual ~type(); \ |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 struct NeedsTracing<ListHashSetNode<T, WebCore::HeapListHashSetAllocator<T, inli
neCapacity> > *> { | 1125 struct NeedsTracing<ListHashSetNode<T, WebCore::HeapListHashSetAllocator<T, inli
neCapacity> > *> { |
| 1116 // All heap allocated node pointers need visiting to keep the nodes alive, | 1126 // All heap allocated node pointers need visiting to keep the nodes alive, |
| 1117 // regardless of whether they contain pointers to other heap allocated | 1127 // regardless of whether they contain pointers to other heap allocated |
| 1118 // objects. | 1128 // objects. |
| 1119 static const bool value = true; | 1129 static const bool value = true; |
| 1120 }; | 1130 }; |
| 1121 | 1131 |
| 1122 } // namespace WTF | 1132 } // namespace WTF |
| 1123 | 1133 |
| 1124 #endif | 1134 #endif |
| OLD | NEW |