Bug 1451262 - Call NS_ProcessPendingEvents after StopSSLServerCertVerificationThreads r=mayhemer

If there are still pending events after we null out gSocketThread, OnSocketThread() will always return false, which can trigger assertions.

MozReview-Commit-ID: CovFIU3cKL

--HG--
extra : rebase_source : e025dce2a347249be7a259fdcca2c6a8c6040d13
This commit is contained in:
Valentin Gosu 2018-05-10 10:37:24 +02:00
parent 1c9f0c12b7
commit 3814b161a4

View File

@ -1067,7 +1067,12 @@ nsSocketTransportService::Run()
// socket detach handlers get processed.
NS_ProcessPendingEvents(mRawThread);
// Stopping the SLL threads can generate new events, so we need to
// process them before nulling out gSocketThread, otherwise we can get
// !onSocketThread assertions.
psm::StopSSLServerCertVerificationThreads();
NS_ProcessPendingEvents(mRawThread);
gSocketThread = nullptr;
SOCKET_LOG(("STS thread exit\n"));