зеркало из https://github.com/mozilla/gecko-dev.git
fix crash on exit in nsMsgSearchSession destructor, 313357 sr=mscott
This commit is contained in:
Родитель
b47111b006
Коммит
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();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче