diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 23:58:23 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 23:58:23 -0500 |
commit | 3d9db9cb381f7e4461708d844cc958cb65a04e56 (patch) | |
tree | 50e14cc0439544db9f526fa9615c5b17dd3e941a /mailnews | |
parent | 4b217ebe51445711251e60f25ac509c2e4057815 (diff) | |
download | uxp-3d9db9cb381f7e4461708d844cc958cb65a04e56.tar.gz |
Bug 1386601 - experimental patch to investigate Thunderbird topcrash, serializes S/MIME verification.
Tag #1273
Diffstat (limited to 'mailnews')
-rw-r--r-- | mailnews/mime/src/nsCMS.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mailnews/mime/src/nsCMS.cpp b/mailnews/mime/src/nsCMS.cpp index 6717c0840f..dd9d31c287 100644 --- a/mailnews/mime/src/nsCMS.cpp +++ b/mailnews/mime/src/nsCMS.cpp @@ -24,6 +24,7 @@ #include "pkix/Result.h" #include "pkix/pkixtypes.h" #include "smime.h" +#include "mozilla/StaticMutex.h" using namespace mozilla; using namespace mozilla::psm; @@ -430,6 +431,7 @@ private: { MOZ_ASSERT(!NS_IsMainThread()); + mozilla::StaticMutexAutoLock lock(sMutex); nsresult rv; if (!mDigestData.IsEmpty()) { rv = mMessage->VerifyDetachedSignature( @@ -453,8 +455,12 @@ private: nsCOMPtr<nsISMimeVerificationListener> mListener; nsCString mDigestData; int16_t mDigestType; + + static mozilla::StaticMutex sMutex; }; +mozilla::StaticMutex SMimeVerificationTask::sMutex; + nsresult nsCMSMessage::CommonAsyncVerifySignature(nsISMimeVerificationListener *aListener, unsigned char* aDigestData, uint32_t aDigestDataLen, int16_t aDigestType) |