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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
675 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) | 675 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) |
676 { | 676 { |
677 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <T, RefCountedGarbageCollected>::value; | 677 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <T, RefCountedGarbageCollected>::value; |
678 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>: :value; | 678 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>: :value; |
679 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected); | 679 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected); |
680 COMPILE_ASSERT(notRefCounted, youMustAdopt); | 680 COMPILE_ASSERT(notRefCounted, youMustAdopt); |
681 return PassOwnPtrWillBeRawPtr<T>(ptr); | 681 return PassOwnPtrWillBeRawPtr<T>(ptr); |
682 } | 682 } |
683 | 683 |
684 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED // do nothing when oilpan is ena bled. | 684 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED // do nothing when oilpan is ena bled. |
685 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_NONE(type) // do nothing | |
686 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_NONE(type) // do nothing | |
687 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BY_NONE(type) // do nothing | |
tkent
2014/03/13 01:12:58
WILL_BY -> WILL_BE
zerny-chromium
2014/03/13 06:44:55
Oh. Thanks for spotting that!
| |
685 | 688 |
686 #else // !ENABLE(OILPAN) | 689 #else // !ENABLE(OILPAN) |
687 | 690 |
688 template<typename T> | 691 template<typename T> |
689 class DummyBase { | 692 class DummyBase { |
690 public: | 693 public: |
691 DummyBase() { } | 694 DummyBase() { } |
692 ~DummyBase() { } | 695 ~DummyBase() { } |
693 }; | 696 }; |
694 | 697 |
(...skipping 25 matching lines...) Expand all Loading... | |
720 #define WillBeHeapSupplement WebCore::Supplement | 723 #define WillBeHeapSupplement WebCore::Supplement |
721 #define WillBeHeapSupplementable WebCore::Supplementable | 724 #define WillBeHeapSupplementable WebCore::Supplementable |
722 #define WillBeHeapTerminatedArray WTF::TerminatedArray | 725 #define WillBeHeapTerminatedArray WTF::TerminatedArray |
723 #define WillBeHeapTerminatedArrayBuilder WTF::TerminatedArrayBuilder | 726 #define WillBeHeapTerminatedArrayBuilder WTF::TerminatedArrayBuilder |
724 | 727 |
725 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); } | 728 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); } |
726 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo llected(T* ptr) { return adoptRef(ptr); } | 729 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo llected(T* ptr) { return adoptRef(ptr); } |
727 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); } | 730 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); } |
728 | 731 |
729 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED | 732 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED |
733 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_NONE(type) \ | |
734 public: \ | |
735 ~type(); \ | |
736 private: | |
737 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_NONE(type) \ | |
738 public: \ | |
739 virtual ~type(); \ | |
740 private: | |
741 | |
742 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BY_NONE(type) \ | |
743 type::~type() { } | |
730 | 744 |
731 #endif // ENABLE(OILPAN) | 745 #endif // ENABLE(OILPAN) |
732 | 746 |
733 } // namespace WebCore | 747 } // namespace WebCore |
734 | 748 |
735 namespace WTF { | 749 namespace WTF { |
736 | 750 |
737 template <typename T> struct VectorTraits<WebCore::Member<T> > : VectorTraitsBas e<WebCore::Member<T> > { | 751 template <typename T> struct VectorTraits<WebCore::Member<T> > : VectorTraitsBas e<WebCore::Member<T> > { |
738 static const bool needsDestruction = false; | 752 static const bool needsDestruction = false; |
739 static const bool canInitializeWithMemset = true; | 753 static const bool canInitializeWithMemset = true; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
869 }; | 883 }; |
870 | 884 |
871 template<typename T, typename U> | 885 template<typename T, typename U> |
872 struct NeedsTracing<HashMap<T, U> > { | 886 struct NeedsTracing<HashMap<T, U> > { |
873 static const bool value = false; | 887 static const bool value = false; |
874 }; | 888 }; |
875 | 889 |
876 } // namespace WTF | 890 } // namespace WTF |
877 | 891 |
878 #endif | 892 #endif |
OLD | NEW |