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

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

Issue 1754313002: Simplify the shutdown sequence of Oilpan's heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/ThreadState.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/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index 01ed8598dd0c01cf5df0c254f59d357df35af818..46272814d0ae337f41e2e2cd977347a4f4c0d74f 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -235,19 +235,6 @@ void ThreadState::detachMainThread()
attachedThreads().remove(state);
state->~ThreadState();
}
- shutdownHeapIfNecessary();
-}
-
-void ThreadState::shutdownHeapIfNecessary()
-{
- // We don't need to enter a safe point before acquiring threadAttachMutex
- // because this thread is already detached.
-
- MutexLocker locker(threadAttachMutex());
- // We start shutting down the heap if there is no running thread
- // and Heap::shutdown() is already called.
- if (!attachedThreads().size() && Heap::s_shutdownCalled)
- Heap::doShutdown();
}
void ThreadState::attach()
@@ -323,7 +310,6 @@ void ThreadState::detach()
state->cleanup();
RELEASE_ASSERT(state->gcState() == ThreadState::NoGCScheduled);
delete state;
- shutdownHeapIfNecessary();
}
void ThreadState::visitPersistentRoots(Visitor* visitor)
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698