Bug 1453003 - Ignore calls to profiler_unregister_thread() that happen after the main thread has shut down. r=njn

MozReview-Commit-ID: 1PmoQe5BbPZ

--HG--
extra : source : fd7869d5d03b42fe3402331c323e7375dde928df
This commit is contained in:
Markus Stange 2018-04-12 22:41:03 -04:00
parent 898e5842d9
commit b8e12a1963

View File

@ -3145,7 +3145,11 @@ void
profiler_unregister_thread()
{
MOZ_ASSERT_IF(NS_IsMainThread(), Scheduler::IsCooperativeThread());
MOZ_RELEASE_ASSERT(CorePS::Exists());
if (!CorePS::Exists()) {
// This function can be called after the main thread has already shut down.
return;
}
PSAutoLock lock(gPSMutex);