summaryrefslogtreecommitdiffstats
path: root/mailnews
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 23:58:23 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 23:58:23 -0500
commit3d9db9cb381f7e4461708d844cc958cb65a04e56 (patch)
tree50e14cc0439544db9f526fa9615c5b17dd3e941a /mailnews
parent4b217ebe51445711251e60f25ac509c2e4057815 (diff)
downloadUXP-3d9db9cb381f7e4461708d844cc958cb65a04e56.tar
UXP-3d9db9cb381f7e4461708d844cc958cb65a04e56.tar.gz
UXP-3d9db9cb381f7e4461708d844cc958cb65a04e56.tar.lz
UXP-3d9db9cb381f7e4461708d844cc958cb65a04e56.tar.xz
UXP-3d9db9cb381f7e4461708d844cc958cb65a04e56.zip
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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mailnews/mime/src/nsCMS.cpp b/mailnews/mime/src/nsCMS.cpp
index 6717c0840..dd9d31c28 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)