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

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

Issue 1962513002: Upon clearing, release PersistentNode of cross-thread-persistent also. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 void prepareForThreadStateTermination(ThreadState*); 195 void prepareForThreadStateTermination(ThreadState*);
196 196
197 static bool shouldTracePersistentNode(Visitor*, PersistentNode*); 197 static bool shouldTracePersistentNode(Visitor*, PersistentNode*);
198 198
199 private: 199 private:
200 // We don't make CrossThreadPersistentRegion inherit from PersistentRegion 200 // We don't make CrossThreadPersistentRegion inherit from PersistentRegion
201 // because we don't want to virtualize performance-sensitive methods 201 // because we don't want to virtualize performance-sensitive methods
202 // such as PersistentRegion::allocate/freePersistentNode. 202 // such as PersistentRegion::allocate/freePersistentNode.
203 OwnPtr<PersistentRegion> m_persistentRegion; 203 OwnPtr<PersistentRegion> m_persistentRegion;
204 Mutex m_mutex; 204
205 // Recursive as prepareForThreadStateTermination() clears a PersistentNode's
206 // associated Persistent<> -- it in turn freeing the PersistentNode. And bot h
207 // CrossThreadPersistentRegion operations need a lock on the region before
208 // mutating.
209 RecursiveMutex m_mutex;
205 }; 210 };
206 211
207 } // namespace blink 212 } // namespace blink
208 213
209 #endif 214 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698