| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) | 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef ThreadSafeRefCounted_h | 30 #ifndef ThreadSafeRefCounted_h |
| 31 #define ThreadSafeRefCounted_h | 31 #define ThreadSafeRefCounted_h |
| 32 | 32 |
| 33 #include "wtf/Allocator.h" | 33 #include "platform/wtf/Allocator.h" |
| 34 #include "wtf/Atomics.h" | 34 #include "platform/wtf/Atomics.h" |
| 35 #include "wtf/DynamicAnnotations.h" | 35 #include "platform/wtf/DynamicAnnotations.h" |
| 36 #include "wtf/Noncopyable.h" | 36 #include "platform/wtf/Noncopyable.h" |
| 37 #include "wtf/WTFExport.h" | 37 #include "platform/wtf/WTFExport.h" |
| 38 | 38 |
| 39 namespace WTF { | 39 namespace WTF { |
| 40 | 40 |
| 41 class WTF_EXPORT ThreadSafeRefCountedBase { | 41 class WTF_EXPORT ThreadSafeRefCountedBase { |
| 42 WTF_MAKE_NONCOPYABLE(ThreadSafeRefCountedBase); | 42 WTF_MAKE_NONCOPYABLE(ThreadSafeRefCountedBase); |
| 43 USING_FAST_MALLOC(ThreadSafeRefCountedBase); | 43 USING_FAST_MALLOC(ThreadSafeRefCountedBase); |
| 44 | 44 |
| 45 public: | 45 public: |
| 46 ThreadSafeRefCountedBase(int initialRefCount = 1) | 46 ThreadSafeRefCountedBase(int initialRefCount = 1) |
| 47 : m_refCount(initialRefCount) {} | 47 : m_refCount(initialRefCount) {} |
| (...skipping 29 matching lines...) Expand all Loading... |
| 77 | 77 |
| 78 protected: | 78 protected: |
| 79 ThreadSafeRefCounted() {} | 79 ThreadSafeRefCounted() {} |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace WTF | 82 } // namespace WTF |
| 83 | 83 |
| 84 using WTF::ThreadSafeRefCounted; | 84 using WTF::ThreadSafeRefCounted; |
| 85 | 85 |
| 86 #endif // ThreadSafeRefCounted_h | 86 #endif // ThreadSafeRefCounted_h |
| OLD | NEW |