| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef Persistent_h | 5 #ifndef Persistent_h |
| 6 #define Persistent_h | 6 #define Persistent_h |
| 7 | 7 |
| 8 #include "platform/heap/Heap.h" | 8 #include "platform/heap/Heap.h" |
| 9 #include "platform/heap/Member.h" | 9 #include "platform/heap/Member.h" |
| 10 #include "platform/heap/PersistentNode.h" | 10 #include "platform/heap/PersistentNode.h" |
| 11 #include "platform/heap/Visitor.h" | 11 #include "platform/heap/Visitor.h" |
| 12 #include "wtf/Allocator.h" | 12 #include "platform/wtf/Allocator.h" |
| 13 #include "wtf/Atomics.h" | 13 #include "platform/wtf/Atomics.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 // Marker used to annotate persistent objects and collections with, | 17 // Marker used to annotate persistent objects and collections with, |
| 18 // so as to enable reliable testing for persistent references via | 18 // so as to enable reliable testing for persistent references via |
| 19 // a type trait (see TypeTraits.h's IsPersistentReferenceType<>.) | 19 // a type trait (see TypeTraits.h's IsPersistentReferenceType<>.) |
| 20 #define IS_PERSISTENT_REFERENCE_TYPE() \ | 20 #define IS_PERSISTENT_REFERENCE_TYPE() \ |
| 21 public: \ | 21 public: \ |
| 22 using IsPersistentReferenceTypeMarker = int; \ | 22 using IsPersistentReferenceTypeMarker = int; \ |
| 23 \ | 23 \ |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 static blink::CrossThreadPersistent<T> Unwrap( | 803 static blink::CrossThreadPersistent<T> Unwrap( |
| 804 const blink::CrossThreadWeakPersistent<T>& wrapped) { | 804 const blink::CrossThreadWeakPersistent<T>& wrapped) { |
| 805 blink::CrossThreadPersistentRegion::LockScope persistentLock( | 805 blink::CrossThreadPersistentRegion::LockScope persistentLock( |
| 806 blink::ProcessHeap::crossThreadPersistentRegion()); | 806 blink::ProcessHeap::crossThreadPersistentRegion()); |
| 807 return blink::CrossThreadPersistent<T>(wrapped.get()); | 807 return blink::CrossThreadPersistent<T>(wrapped.get()); |
| 808 } | 808 } |
| 809 }; | 809 }; |
| 810 } | 810 } |
| 811 | 811 |
| 812 #endif // Persistent_h | 812 #endif // Persistent_h |
| OLD | NEW |