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

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

Issue 1761853002: Shut down all threads before the main thread shuts down (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
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 e86242386c6b3115e6fe14f03bbda113e61c6014..f99268b6f76d164c1d3ae258b93c8e9d9d36a76d 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -205,7 +205,7 @@ void ThreadState::attachMainThread()
{
RELEASE_ASSERT(!Heap::s_shutdownCalled);
MutexLocker locker(threadAttachMutex());
- ThreadState* state = new(s_mainThreadStateStorage) ThreadState();
+ ThreadState* state = new (s_mainThreadStateStorage) ThreadState();
attachedThreads().add(state);
}
@@ -216,6 +216,7 @@ void ThreadState::detachMainThread()
// threadAttachMutex and waiting for other threads to pause or reach a
// safepoint.
ThreadState* state = mainThreadState();
+ ASSERT(state->checkThread());
// 1. Finish sweeping.
state->completeSweep();

Powered by Google App Engine
This is Rietveld 408576698