зеркало из https://github.com/mozilla/pjs.git
fix crash when clearing search during quick ab search, r=standard8, sr=mscott 330507
This commit is contained in:
Родитель
bcba9d65d6
Коммит
f5ef355afb
|
@ -464,6 +464,7 @@ nsresult nsAbLDAPDirectory::OnSearchFinished (PRInt32 result)
|
||||||
|
|
||||||
nsAutoLock lock (mLock);
|
nsAutoLock lock (mLock);
|
||||||
mPerformingQuery = PR_FALSE;
|
mPerformingQuery = PR_FALSE;
|
||||||
|
mListener = nsnull; // break cycle with listener
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,12 +141,14 @@ nsAbQueryLDAPMessageListener::nsAbQueryLDAPMessageListener (
|
||||||
mLock(0)
|
mLock(0)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
NS_ADDREF(mDirectoryQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAbQueryLDAPMessageListener::~nsAbQueryLDAPMessageListener ()
|
nsAbQueryLDAPMessageListener::~nsAbQueryLDAPMessageListener ()
|
||||||
{
|
{
|
||||||
if (mLock)
|
if (mLock)
|
||||||
PR_DestroyLock (mLock);
|
PR_DestroyLock (mLock);
|
||||||
|
NS_RELEASE(mDirectoryQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsAbQueryLDAPMessageListener::Initiate ()
|
nsresult nsAbQueryLDAPMessageListener::Initiate ()
|
||||||
|
|
|
@ -74,9 +74,9 @@ protected:
|
||||||
nsXPIDLCString mLogin; // authenticate to the LDAP server as...
|
nsXPIDLCString mLogin; // authenticate to the LDAP server as...
|
||||||
nsCOMPtr<nsILDAPURL> mDirectoryUrl; // the URL for the server
|
nsCOMPtr<nsILDAPURL> mDirectoryUrl; // the URL for the server
|
||||||
PRUint32 mProtocolVersion; // version of LDAP (see nsILDAPConnection.idl)
|
PRUint32 mProtocolVersion; // version of LDAP (see nsILDAPConnection.idl)
|
||||||
|
nsCOMPtr <nsILDAPMessageListener> mListener;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nsCOMPtr <nsILDAPMessageListener> mListener;
|
|
||||||
PRBool mInitialized;
|
PRBool mInitialized;
|
||||||
|
|
||||||
PRLock* mLock;
|
PRLock* mLock;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче