| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 | 643 |
| 644 template <typename T> struct RemoveHeapPointerWrapperTypes { | 644 template <typename T> struct RemoveHeapPointerWrapperTypes { |
| 645 using Type = typename WTF::RemoveTemplate<typename WTF::RemoveTemplate<typen
ame WTF::RemoveTemplate<T, Member>::Type, WeakMember>::Type, RawPtr>::Type; | 645 using Type = typename WTF::RemoveTemplate<typename WTF::RemoveTemplate<typen
ame WTF::RemoveTemplate<T, Member>::Type, WeakMember>::Type, RawPtr>::Type; |
| 646 }; | 646 }; |
| 647 | 647 |
| 648 // FIXME: Oilpan: TraceIfNeeded should be implemented ala: | 648 // FIXME: Oilpan: TraceIfNeeded should be implemented ala: |
| 649 // NeedsTracing<T>::value || IsWeakMember<T>::value. It should not need to test | 649 // NeedsTracing<T>::value || IsWeakMember<T>::value. It should not need to test |
| 650 // raw pointer types. To remove these tests, we may need support for | 650 // raw pointer types. To remove these tests, we may need support for |
| 651 // instantiating a template with a RawPtrOrMember'ish template. | 651 // instantiating a template with a RawPtrOrMember'ish template. |
| 652 template<typename T> | 652 template<typename T> |
| 653 struct TraceIfNeeded : public TraceIfEnabled<T, WTF::NeedsTracing<T>::value || b
link::IsGarbageCollectedType<typename RemoveHeapPointerWrapperTypes<typename WTF
::RemovePointer<T>::Type>::Type>::value> { }; | 653 struct TraceIfNeeded : public TraceIfEnabled<T, WTF::NeedsTracing<T>::value || I
sGarbageCollectedType<typename RemoveHeapPointerWrapperTypes<typename WTF::Remov
ePointer<T>::Type>::Type>::value> { }; |
| 654 | 654 |
| 655 // This trace trait for std::pair will null weak members if their referent is | 655 // This trace trait for std::pair will null weak members if their referent is |
| 656 // collected. If you have a collection that contain weakness it does not remove | 656 // collected. If you have a collection that contain weakness it does not remove |
| 657 // entries from the collection that contain nulled weak members. | 657 // entries from the collection that contain nulled weak members. |
| 658 template<typename T, typename U> | 658 template<typename T, typename U> |
| 659 class TraceTrait<std::pair<T, U>> { | 659 class TraceTrait<std::pair<T, U>> { |
| 660 public: | 660 public: |
| 661 static const bool firstNeedsTracing = WTF::NeedsTracing<T>::value || WTF::Is
Weak<T>::value; | 661 static const bool firstNeedsTracing = WTF::NeedsTracing<T>::value || WTF::Is
Weak<T>::value; |
| 662 static const bool secondNeedsTracing = WTF::NeedsTracing<U>::value || WTF::I
sWeak<U>::value; | 662 static const bool secondNeedsTracing = WTF::NeedsTracing<U>::value || WTF::I
sWeak<U>::value; |
| 663 template<typename VisitorDispatcher> | 663 template<typename VisitorDispatcher> |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 template<typename T> | 1112 template<typename T> |
| 1113 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { | 1113 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { |
| 1114 }; | 1114 }; |
| 1115 | 1115 |
| 1116 template<typename T> | 1116 template<typename T> |
| 1117 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1117 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 1118 | 1118 |
| 1119 } // namespace WTF | 1119 } // namespace WTF |
| 1120 | 1120 |
| 1121 #endif | 1121 #endif |
| OLD | NEW |