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

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

Issue 850433002: During thread detach, delay final sweep until shutdown lock is held. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index dcb601d0303c5530c240cb241aecbff9eef83b17..e872e433d319ace02a402ef969be09ca5b30ed79 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -428,8 +428,6 @@ void ThreadState::cleanupPages()
void ThreadState::cleanup()
{
checkThread();
- // Finish sweeping.
- completeSweep();
{
// Grab the threadAttachMutex to ensure only one thread can shutdown at
// a time and that no other thread can do a global GC. It also allows
@@ -439,6 +437,9 @@ void ThreadState::cleanup()
// GC.
SafePointAwareMutexLocker locker(threadAttachMutex(), NoHeapPointersOnStack);
+ // Finish sweeping.
+ completeSweep();
+
// From here on ignore all conservatively discovered
// pointers into the heap owned by this thread.
m_isTerminating = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698