Bug 1507718 - crash in nsImapProtocol::GetMessageSize(). Make m_hostSessionList an nsCOMPtr.

Tag #1273
This commit is contained in:
Matt A. Tobin 2019-11-10 22:20:52 -05:00 committed by Roy Tam
commit 8525e02caf
2 changed files with 3 additions and 3 deletions

View file

@ -530,7 +530,7 @@ nsresult nsImapProtocol::Configure(int32_t TooFastTime, int32_t IdealTime,
NS_IMETHODIMP
nsImapProtocol::Initialize(nsIImapHostSessionList * aHostSessionList,
nsImapProtocol::Initialize(nsIImapHostSessionList *aHostSessionList,
nsIImapIncomingServer *aServer)
{
NS_PRECONDITION(aHostSessionList && aServer,
@ -551,7 +551,7 @@ nsImapProtocol::Initialize(nsIImapHostSessionList * aHostSessionList,
aServer->GetUseCompressDeflate(&m_useCompressDeflate);
NS_ADDREF(m_flagState);
m_hostSessionList = aHostSessionList; // no ref count...host session list has life time > connection
m_hostSessionList = aHostSessionList;
m_parser.SetHostSessionList(aHostSessionList);
m_parser.SetFlagState(m_flagState);

View file

@ -619,7 +619,7 @@ private:
nsDataHashtable<nsCStringHashKey, int32_t> m_specialXListMailboxes;
nsIImapHostSessionList * m_hostSessionList;
nsCOMPtr<nsIImapHostSessionList> m_hostSessionList;
bool m_fromHeaderSeen;