Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 708813 - LDAP connection broken (application deadlocks) starting …

…with version 9. r=honza,a=Standard8 for checkin to Thunderbird/SeaMonkey specific relbranch

--HG--
branch : COMM100_2012012414_RELBRANCH
  • Loading branch information...
commit 8665353b980756592386252128f641611d8dedef 1 parent 101ef76
@briansmith briansmith authored
View
18 security/manager/ssl/src/PSMRunnable.cpp
@@ -46,14 +46,18 @@ SyncRunnableBase::SyncRunnableBase()
nsresult
SyncRunnableBase::DispatchToMainThreadAndWait()
{
- NS_ASSERTION(!NS_IsMainThread(),
- "DispatchToMainThreadAndWait called on the main thread.");
-
- mozilla::MonitorAutoLock lock(monitor);
- nsresult rv = NS_DispatchToMainThread(this);
- if (NS_SUCCEEDED(rv)) {
- lock.Wait();
+ nsresult rv;
+ if (NS_IsMainThread()) {
+ RunOnTargetThread();
+ rv = NS_OK;
+ } else {
+ mozilla::MonitorAutoLock lock(monitor);
+ rv = NS_DispatchToMainThread(this);
+ if (NS_SUCCEEDED(rv)) {
+ lock.Wait();
+ }
}
+
return rv;
}
View
6 security/manager/ssl/src/nsNSSCallbacks.cpp
@@ -825,11 +825,7 @@ PK11PasswordPrompt(PK11SlotInfo* slot, PRBool retry, void* arg)
nsRefPtr<PK11PasswordPromptRunnable> runnable =
new PK11PasswordPromptRunnable(slot,
static_cast<nsIInterfaceRequestor*>(arg));
- if (NS_IsMainThread()) {
- runnable->RunOnTargetThread();
- } else {
- runnable->DispatchToMainThreadAndWait();
- }
+ runnable->DispatchToMainThreadAndWait();
return runnable->mResult;
}
View
5 security/manager/ssl/src/nsNSSIOLayer.cpp
@@ -827,11 +827,6 @@ void nsNSSSocketInfo::GetPreviousCert(nsIX509Cert** _result)
NS_ASSERTION(_result, "_result parameter to GetPreviousCert is null");
*_result = nsnull;
- if (NS_IsMainThread()) {
- NS_ERROR("nsNSSSocketInfo::GetPreviousCert called on the main thread");
- return;
- }
-
nsRefPtr<PreviousCertRunnable> runnable = new PreviousCertRunnable(mCallbacks);
nsresult rv = runnable->DispatchToMainThreadAndWait();
NS_ASSERTION(NS_SUCCEEDED(rv), "runnable->DispatchToMainThreadAndWait() failed");
Please sign in to comment.
Something went wrong with that request. Please try again.