| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PersistentNode_h | 5 #ifndef PersistentNode_h |
| 6 #define PersistentNode_h | 6 #define PersistentNode_h |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
| 9 #include "platform/heap/ThreadState.h" | 10 #include "platform/heap/ThreadState.h" |
| 10 #include "wtf/Allocator.h" | 11 #include "wtf/Allocator.h" |
| 11 #include "wtf/Assertions.h" | 12 #include "wtf/Assertions.h" |
| 12 #include "wtf/PtrUtil.h" | 13 #include "wtf/PtrUtil.h" |
| 13 #include "wtf/ThreadingPrimitives.h" | 14 #include "wtf/ThreadingPrimitives.h" |
| 14 #include <memory> | |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class CrossThreadPersistentRegion; | 18 class CrossThreadPersistentRegion; |
| 19 | 19 |
| 20 class PersistentNode final { | 20 class PersistentNode final { |
| 21 DISALLOW_NEW(); | 21 DISALLOW_NEW(); |
| 22 | 22 |
| 23 public: | 23 public: |
| 24 PersistentNode() : m_self(nullptr), m_trace(nullptr) { ASSERT(isUnused()); } | 24 PersistentNode() : m_self(nullptr), m_trace(nullptr) { ASSERT(isUnused()); } |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Recursive as prepareForThreadStateTermination() clears a PersistentNode's | 245 // Recursive as prepareForThreadStateTermination() clears a PersistentNode's |
| 246 // associated Persistent<> -- it in turn freeing the PersistentNode. And both | 246 // associated Persistent<> -- it in turn freeing the PersistentNode. And both |
| 247 // CrossThreadPersistentRegion operations need a lock on the region before | 247 // CrossThreadPersistentRegion operations need a lock on the region before |
| 248 // mutating. | 248 // mutating. |
| 249 RecursiveMutex m_mutex; | 249 RecursiveMutex m_mutex; |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 } // namespace blink | 252 } // namespace blink |
| 253 | 253 |
| 254 #endif | 254 #endif |
| OLD | NEW |