Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: Source/heap/Handle.h

Issue 182063004: Rename adoptRefCountedWillBeRefCountedGarbageCollected to adoptRefWillBeRefCountedGarbageCollected (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/heap/HeapTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) 610 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr)
611 { 611 {
612 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <T, RefCountedGarbageCollected>::value; 612 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <T, RefCountedGarbageCollected>::value;
613 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>: :value; 613 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>: :value;
614 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected); 614 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected);
615 COMPILE_ASSERT(notRefCounted, youMustAdopt); 615 COMPILE_ASSERT(notRefCounted, youMustAdopt);
616 return PassRefPtrWillBeRawPtr<T>(ptr); 616 return PassRefPtrWillBeRawPtr<T>(ptr);
617 } 617 }
618 618
619 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefCountedWillBeRefCountedGa rbageCollected(T* ptr) 619 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo llected(T* ptr)
620 { 620 {
621 static const bool isRefCountedGarbageCollected = WTF::IsSubclassOfTemplate<T , RefCountedGarbageCollected>::value; 621 static const bool isRefCountedGarbageCollected = WTF::IsSubclassOfTemplate<T , RefCountedGarbageCollected>::value;
622 COMPILE_ASSERT(isRefCountedGarbageCollected, useAdoptRefWillBeNoop); 622 COMPILE_ASSERT(isRefCountedGarbageCollected, useAdoptRefWillBeNoop);
623 return PassRefPtrWillBeRawPtr<T>(adoptRefCountedGarbageCollected(ptr)); 623 return PassRefPtrWillBeRawPtr<T>(adoptRefCountedGarbageCollected(ptr));
624 } 624 }
625 625
626 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) 626 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr)
627 { 627 {
628 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <T, RefCountedGarbageCollected>::value; 628 static const bool notRefCountedGarbageCollected = !WTF::IsSubclassOfTemplate <T, RefCountedGarbageCollected>::value;
629 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>: :value; 629 static const bool notRefCounted = !WTF::IsSubclassOfTemplate<T, RefCounted>: :value;
(...skipping 29 matching lines...) Expand all
659 #define NoBaseWillBeGarbageCollected WebCore::DummyBase 659 #define NoBaseWillBeGarbageCollected WebCore::DummyBase
660 #define NoBaseWillBeGarbageCollectedFinalized WebCore::DummyBase 660 #define NoBaseWillBeGarbageCollectedFinalized WebCore::DummyBase
661 #define WillBeHeapHashMap WTF::HashMap 661 #define WillBeHeapHashMap WTF::HashMap
662 #define WillBePersistentHeapHashMap WTF::HashMap 662 #define WillBePersistentHeapHashMap WTF::HashMap
663 #define WillBeHeapHashSet WTF::HashSet 663 #define WillBeHeapHashSet WTF::HashSet
664 #define WillBePersistentHeapHashSet WTF::HashSet 664 #define WillBePersistentHeapHashSet WTF::HashSet
665 #define WillBeHeapVector WTF::Vector 665 #define WillBeHeapVector WTF::Vector
666 #define WillBePersistentHeapVector WTF::Vector 666 #define WillBePersistentHeapVector WTF::Vector
667 667
668 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); } 668 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeNoop(T* ptr) { retu rn adoptRef(ptr); }
669 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefCountedWillBeRefCountedGa rbageCollected(T* ptr) { return adoptRef(ptr); } 669 template<typename T> PassRefPtrWillBeRawPtr<T> adoptRefWillBeRefCountedGarbageCo llected(T* ptr) { return adoptRef(ptr); }
670 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); } 670 template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu rn adoptPtr(ptr); }
671 671
672 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED 672 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED WTF_MAKE_FAST_ALLOCATED
673 673
674 #endif // ENABLE(OILPAN) 674 #endif // ENABLE(OILPAN)
675 675
676 } // namespace WebCore 676 } // namespace WebCore
677 677
678 namespace WTF { 678 namespace WTF {
679 679
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 } 802 }
803 803
804 template<typename T, typename U> 804 template<typename T, typename U>
805 struct NeedsTracing<std::pair<T, U> > { 805 struct NeedsTracing<std::pair<T, U> > {
806 static const bool value = NeedsTracing<T>::value || NeedsTracing<U>::value | | IsWeak<T>::value || IsWeak<U>::value; 806 static const bool value = NeedsTracing<T>::value || NeedsTracing<U>::value | | IsWeak<T>::value || IsWeak<U>::value;
807 }; 807 };
808 808
809 } // namespace WTF 809 } // namespace WTF
810 810
811 #endif 811 #endif
OLDNEW
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698