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 "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/heap/ThreadState.h" | 9 #include "platform/heap/ThreadState.h" |
10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 { | 219 { |
220 // If this assert triggers, you're tracing without being in a LockScope. | 220 // If this assert triggers, you're tracing without being in a LockScope. |
221 #if ENABLE(ASSERT) | 221 #if ENABLE(ASSERT) |
222 DCHECK(m_mutex.locked()); | 222 DCHECK(m_mutex.locked()); |
223 #endif | 223 #endif |
224 m_persistentRegion->tracePersistentNodes(visitor, CrossThreadPersistentR
egion::shouldTracePersistentNode); | 224 m_persistentRegion->tracePersistentNodes(visitor, CrossThreadPersistentR
egion::shouldTracePersistentNode); |
225 } | 225 } |
226 | 226 |
227 void prepareForThreadStateTermination(ThreadState*); | 227 void prepareForThreadStateTermination(ThreadState*); |
228 | 228 |
| 229 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
229 static bool shouldTracePersistentNode(Visitor*, PersistentNode*); | 230 static bool shouldTracePersistentNode(Visitor*, PersistentNode*); |
230 | 231 |
231 private: | 232 private: |
232 friend class LockScope; | 233 friend class LockScope; |
233 | 234 |
234 void lock() | 235 void lock() |
235 { | 236 { |
236 m_mutex.lock(); | 237 m_mutex.lock(); |
237 } | 238 } |
238 | 239 |
(...skipping 10 matching lines...) Expand all Loading... |
249 // Recursive as prepareForThreadStateTermination() clears a PersistentNode's | 250 // Recursive as prepareForThreadStateTermination() clears a PersistentNode's |
250 // associated Persistent<> -- it in turn freeing the PersistentNode. And bot
h | 251 // associated Persistent<> -- it in turn freeing the PersistentNode. And bot
h |
251 // CrossThreadPersistentRegion operations need a lock on the region before | 252 // CrossThreadPersistentRegion operations need a lock on the region before |
252 // mutating. | 253 // mutating. |
253 RecursiveMutex m_mutex; | 254 RecursiveMutex m_mutex; |
254 }; | 255 }; |
255 | 256 |
256 } // namespace blink | 257 } // namespace blink |
257 | 258 |
258 #endif | 259 #endif |
OLD | NEW |