mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-04 16:15:25 +00:00
fix crash on exit in nsMsgSearchSession destructor, 313357 sr=mscott
This commit is contained in:
parent
b47111b006
commit
728735cdd4
@ -125,11 +125,9 @@ nsMsgSearchBoolExpression::nsMsgSearchBoolExpression (nsMsgSearchBoolExpression
|
||||
|
||||
nsMsgSearchBoolExpression::~nsMsgSearchBoolExpression()
|
||||
{
|
||||
// we must recursively destroy all sub expressions before we destroy ourself.....We leave search terms alone!
|
||||
if (m_leftChild)
|
||||
delete m_leftChild;
|
||||
if (m_rightChild)
|
||||
delete m_rightChild;
|
||||
// we must recursively destroy all sub expressions before we destroy ourself.....We leave search terms alone!
|
||||
delete m_leftChild;
|
||||
delete m_rightChild;
|
||||
}
|
||||
|
||||
nsMsgSearchBoolExpression *
|
||||
@ -590,7 +588,7 @@ nsresult nsMsgSearchOfflineMail::MatchTerms(nsIMsgDBHdr *msgToMatch,
|
||||
PRUint32 headerSize,
|
||||
PRBool Filtering,
|
||||
nsMsgSearchBoolExpression ** aExpressionTree,
|
||||
PRBool *pResult)
|
||||
PRBool *pResult)
|
||||
{
|
||||
NS_ENSURE_ARG(aExpressionTree);
|
||||
nsresult err;
|
||||
|
@ -96,6 +96,7 @@ nsMsgSearchSession::AddSearchTerm(nsMsgSearchAttribValue attrib,
|
||||
m_termList->AppendElement (pTerm);
|
||||
// force the expression tree to rebuild whenever we change the terms
|
||||
delete m_expressionTree;
|
||||
m_expressionTree = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -105,6 +106,7 @@ nsMsgSearchSession::AppendTerm(nsIMsgSearchTerm *aTerm)
|
||||
NS_ENSURE_ARG_POINTER(aTerm);
|
||||
NS_ENSURE_TRUE(m_termList, NS_ERROR_NOT_INITIALIZED);
|
||||
delete m_expressionTree;
|
||||
m_expressionTree = nsnull;
|
||||
return m_termList->AppendElement(aTerm);
|
||||
}
|
||||
|
||||
@ -648,7 +650,6 @@ void nsMsgSearchSession::DestroyScopeList()
|
||||
|
||||
void nsMsgSearchSession::DestroyTermList ()
|
||||
{
|
||||
delete m_expressionTree;
|
||||
m_termList->Clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user