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

Unified Diff: third_party/WebKit/Source/platform/heap/Heap.cpp

Issue 2695233002: Remove ThreadHeap::allHeaps() (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/Heap.cpp
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index bf086aa367139e968bb66a85da19f122ecec1b8d..428fc9263debac7cf8ad6f95415e8f117409bb33 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -156,24 +156,9 @@ ThreadHeap::ThreadHeap()
m_ephemeronStack(CallbackStack::create()) {
if (ThreadState::current()->isMainThread())
s_mainThreadHeap = this;
-
- MutexLocker locker(ThreadHeap::allHeapsMutex());
- allHeaps().insert(this);
}
ThreadHeap::~ThreadHeap() {
- MutexLocker locker(ThreadHeap::allHeapsMutex());
- allHeaps().remove(this);
-}
-
-RecursiveMutex& ThreadHeap::allHeapsMutex() {
- DEFINE_THREAD_SAFE_STATIC_LOCAL(RecursiveMutex, mutex, (new RecursiveMutex));
- return mutex;
-}
-
-HashSet<ThreadHeap*>& ThreadHeap::allHeaps() {
- DEFINE_STATIC_LOCAL(HashSet<ThreadHeap*>, heaps, ());
- return heaps;
}
void ThreadHeap::attach(ThreadState* thread) {
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698