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

Side by Side Diff: third_party/WebKit/Source/platform/heap/PersistentNode.h

Issue 2602263002: Lend LSan a hand and clear out singleton static persistents first. (Closed)
Patch Set: experiment: disable LSan-GCing during shutdown.. Created 3 years, 11 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
OLDNEW
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 m_freeListHead = persistentNode; 137 m_freeListHead = persistentNode;
138 #if DCHECK_IS_ON() 138 #if DCHECK_IS_ON()
139 --m_persistentCount; 139 --m_persistentCount;
140 #endif 140 #endif
141 } 141 }
142 142
143 static bool shouldTracePersistentNode(Visitor*, PersistentNode*) { 143 static bool shouldTracePersistentNode(Visitor*, PersistentNode*) {
144 return true; 144 return true;
145 } 145 }
146 146
147 #if defined(LEAK_SANITIZER)
148 void clearPersistentNode(PersistentNode*,
149 ThreadState::PersistentClearCallback);
150 #endif
147 void releasePersistentNode(PersistentNode*, 151 void releasePersistentNode(PersistentNode*,
148 ThreadState::PersistentClearCallback); 152 ThreadState::PersistentClearCallback);
149 using ShouldTraceCallback = bool (*)(Visitor*, PersistentNode*); 153 using ShouldTraceCallback = bool (*)(Visitor*, PersistentNode*);
150 void tracePersistentNodes( 154 void tracePersistentNodes(
151 Visitor*, 155 Visitor*,
152 ShouldTraceCallback = PersistentRegion::shouldTracePersistentNode); 156 ShouldTraceCallback = PersistentRegion::shouldTracePersistentNode);
153 int numberOfPersistents(); 157 int numberOfPersistents();
154 158
155 private: 159 private:
156 friend CrossThreadPersistentRegion; 160 friend CrossThreadPersistentRegion;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // Recursive as prepareForThreadStateTermination() clears a PersistentNode's 249 // Recursive as prepareForThreadStateTermination() clears a PersistentNode's
246 // associated Persistent<> -- it in turn freeing the PersistentNode. And both 250 // associated Persistent<> -- it in turn freeing the PersistentNode. And both
247 // CrossThreadPersistentRegion operations need a lock on the region before 251 // CrossThreadPersistentRegion operations need a lock on the region before
248 // mutating. 252 // mutating.
249 RecursiveMutex m_mutex; 253 RecursiveMutex m_mutex;
250 }; 254 };
251 255
252 } // namespace blink 256 } // namespace blink
253 257
254 #endif 258 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Persistent.h ('k') | third_party/WebKit/Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698