зеркало из https://github.com/mozilla/gecko-dev.git
move SetParent call to earlier in the subfolder creation process so that the folder has a parent much earlier. This allows us to benefit from the lazy URI parsing I just checked in.
r=sspitzer just some cleanup work after the previous checkins to fix #20706
This commit is contained in:
Родитель
0461701067
Коммит
79f24d5d40
|
@ -261,6 +261,7 @@ NS_IMETHODIMP nsImapMailFolder::AddSubfolder(nsAutoString *name,
|
|||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
folder->SetParent(this);
|
||||
nsAllocator::Free(uriStr);
|
||||
folder->SetFlag(MSG_FOLDER_FLAG_MAIL);
|
||||
|
||||
|
@ -289,7 +290,6 @@ NS_IMETHODIMP nsImapMailFolder::AddSubfolder(nsAutoString *name,
|
|||
NS_ASSERTION(supports, "couldn't get isupports from imap folder");
|
||||
if (supports)
|
||||
mSubFolders->AppendElement(supports);
|
||||
folder->SetParent(this);
|
||||
*child = folder;
|
||||
NS_IF_ADDREF(*child);
|
||||
return rv;
|
||||
|
|
|
@ -265,6 +265,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::AddSubfolder(nsAutoString *name,
|
|||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
folder->SetParent(this);
|
||||
folder->SetFlag(MSG_FOLDER_FLAG_MAIL);
|
||||
|
||||
PRBool isServer;
|
||||
|
@ -297,7 +298,6 @@ NS_IMETHODIMP nsMsgLocalMailFolder::AddSubfolder(nsAutoString *name,
|
|||
nsCOMPtr<nsISupports> supports = do_QueryInterface(folder);
|
||||
if(folder)
|
||||
mSubFolders->AppendElement(supports);
|
||||
folder->SetParent(this);
|
||||
*child = folder;
|
||||
NS_ADDREF(*child);
|
||||
|
||||
|
|
|
@ -200,7 +200,9 @@ nsMsgNewsFolder::AddSubfolder(nsAutoString name, nsIMsgFolder **child, char *set
|
|||
|
||||
nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(res, &rv));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
return rv;
|
||||
|
||||
folder->SetParent(this);
|
||||
|
||||
rv = folder->SetFlag(MSG_FOLDER_FLAG_NEWSGROUP);
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -229,7 +231,6 @@ nsMsgNewsFolder::AddSubfolder(nsAutoString name, nsIMsgFolder **child, char *set
|
|||
nsCOMPtr<nsISupports> folderSupports(do_QueryInterface(folder));
|
||||
if(folderSupports)
|
||||
mSubFolders->AppendElement(folderSupports);
|
||||
folder->SetParent(this);
|
||||
*child = folder;
|
||||
folder->SetParent(this);
|
||||
NS_ADDREF(*child);
|
||||
|
|
Загрузка…
Ссылка в новой задаче