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

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

Issue 256483003: Add DEFINE_STATIC_REF_WILL_BE_PERSISTENT macro (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/animation/AnimatableValue.cpp ('k') | no next file » | 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected); 788 COMPILE_ASSERT(notRefCountedGarbageCollected, useAdoptRefCountedWillBeRefCou ntedGarbageCollected);
789 COMPILE_ASSERT(notRefCounted, youMustAdopt); 789 COMPILE_ASSERT(notRefCounted, youMustAdopt);
790 return PassOwnPtrWillBeRawPtr<T>(ptr); 790 return PassOwnPtrWillBeRawPtr<T>(ptr);
791 } 791 }
792 792
793 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED // do nothing when oilpan is ena bled. 793 #define WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED // do nothing when oilpan is ena bled.
794 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 794 #define DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
795 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 795 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
796 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing 796 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) // do nothing
797 797
798 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \
799 DEFINE_STATIC_LOCAL(Persistent<type>, name, arguments)
800
798 #else // !ENABLE(OILPAN) 801 #else // !ENABLE(OILPAN)
799 802
800 template<typename T> 803 template<typename T>
801 class DummyBase { 804 class DummyBase {
802 public: 805 public:
803 DummyBase() { } 806 DummyBase() { }
804 ~DummyBase() { } 807 ~DummyBase() { }
805 }; 808 };
806 809
807 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr 810 #define PassRefPtrWillBeRawPtr WTF::PassRefPtr
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 ~type(); \ 856 ~type(); \
854 private: 857 private:
855 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \ 858 #define DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(type) \
856 public: \ 859 public: \
857 virtual ~type(); \ 860 virtual ~type(); \
858 private: 861 private:
859 862
860 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ 863 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \
861 type::~type() { } 864 type::~type() { }
862 865
866 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \
867 DEFINE_STATIC_REF(type, name, arguments)
868
863 #endif // ENABLE(OILPAN) 869 #endif // ENABLE(OILPAN)
864 870
865 } // namespace WebCore 871 } // namespace WebCore
866 872
867 namespace WTF { 873 namespace WTF {
868 874
869 template <typename T> struct VectorTraits<WebCore::Member<T> > : VectorTraitsBas e<WebCore::Member<T> > { 875 template <typename T> struct VectorTraits<WebCore::Member<T> > : VectorTraitsBas e<WebCore::Member<T> > {
870 static const bool needsDestruction = false; 876 static const bool needsDestruction = false;
871 static const bool canInitializeWithMemset = true; 877 static const bool canInitializeWithMemset = true;
872 static const bool canMoveWithMemcpy = true; 878 static const bool canMoveWithMemcpy = true;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 }; 1054 };
1049 1055
1050 template<typename T, typename U, typename V, typename W, typename X> 1056 template<typename T, typename U, typename V, typename W, typename X>
1051 struct NeedsTracing<HashMap<T, U, V, W, X> > { 1057 struct NeedsTracing<HashMap<T, U, V, W, X> > {
1052 static const bool value = false; 1058 static const bool value = false;
1053 }; 1059 };
1054 1060
1055 } // namespace WTF 1061 } // namespace WTF
1056 1062
1057 #endif 1063 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/AnimatableValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698