зеркало из https://github.com/mozilla/pjs.git
patch for bug 234908 "getter_Copies scoping problem" r+sr=bienvenu
This commit is contained in:
Родитель
3b48198123
Коммит
e1a68dd7f0
|
@ -195,7 +195,7 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
|
||||||
} // if rest && *rest
|
} // if rest && *rest
|
||||||
|
|
||||||
nsCOMPtr<nsIMimeConverter> mimeConverter = do_GetService(NS_MIME_CONVERTER_CONTRACTID);
|
nsCOMPtr<nsIMimeConverter> mimeConverter = do_GetService(NS_MIME_CONVERTER_CONTRACTID);
|
||||||
nsXPIDLCString decodedString;
|
char *decodedString;
|
||||||
|
|
||||||
// Now unescape any fields that need escaped...
|
// Now unescape any fields that need escaped...
|
||||||
if (!m_toPart.IsEmpty())
|
if (!m_toPart.IsEmpty())
|
||||||
|
@ -204,10 +204,10 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
|
||||||
if (mimeConverter)
|
if (mimeConverter)
|
||||||
{
|
{
|
||||||
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_toPart.get(),
|
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_toPart.get(),
|
||||||
getter_Copies(decodedString),
|
&decodedString,
|
||||||
"UTF-8", PR_FALSE))
|
"UTF-8", PR_FALSE))
|
||||||
&& decodedString)
|
&& decodedString)
|
||||||
m_toPart = decodedString;
|
m_toPart.Adopt(decodedString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_ccPart.IsEmpty())
|
if (!m_ccPart.IsEmpty())
|
||||||
|
@ -216,10 +216,10 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
|
||||||
if (mimeConverter)
|
if (mimeConverter)
|
||||||
{
|
{
|
||||||
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_ccPart.get(),
|
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_ccPart.get(),
|
||||||
getter_Copies(decodedString),
|
&decodedString,
|
||||||
"UTF-8", PR_FALSE))
|
"UTF-8", PR_FALSE))
|
||||||
&& decodedString)
|
&& decodedString)
|
||||||
m_ccPart = decodedString;
|
m_ccPart.Adopt(decodedString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_subjectPart.IsEmpty())
|
if (!m_subjectPart.IsEmpty())
|
||||||
|
@ -228,10 +228,10 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
|
||||||
if (mimeConverter)
|
if (mimeConverter)
|
||||||
{
|
{
|
||||||
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_subjectPart.get(),
|
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_subjectPart.get(),
|
||||||
getter_Copies(decodedString),
|
&decodedString,
|
||||||
"UTF-8", PR_FALSE))
|
"UTF-8", PR_FALSE))
|
||||||
&& decodedString)
|
&& decodedString)
|
||||||
m_subjectPart = decodedString;
|
m_subjectPart.Adopt(decodedString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_newsgroupPart.IsEmpty())
|
if (!m_newsgroupPart.IsEmpty())
|
||||||
|
@ -244,11 +244,11 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
|
||||||
if (mimeConverter)
|
if (mimeConverter)
|
||||||
{
|
{
|
||||||
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_bodyPart.get(),
|
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_bodyPart.get(),
|
||||||
getter_Copies(decodedString),
|
&decodedString,
|
||||||
"UTF-8", PR_FALSE,
|
"UTF-8", PR_FALSE,
|
||||||
PR_FALSE))
|
PR_FALSE))
|
||||||
&& decodedString)
|
&& decodedString)
|
||||||
m_bodyPart = decodedString;
|
m_bodyPart.Adopt(decodedString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_newsHostPart.IsEmpty())
|
if (!m_newsHostPart.IsEmpty())
|
||||||
|
|
|
@ -1749,9 +1749,11 @@ NS_IMETHODIMP nsImapIncomingServer::DiscoveryDone()
|
||||||
for (PRUint32 i = 0; i < numFolders; i++)
|
for (PRUint32 i = 0; i < numFolders; i++)
|
||||||
{
|
{
|
||||||
nsXPIDLString folderName;
|
nsXPIDLString folderName;
|
||||||
if (NS_SUCCEEDED(trashFolders[i]->GetName(getter_Copies(folderName))) &&
|
if (NS_SUCCEEDED(trashFolders[i]->GetName(getter_Copies(folderName))))
|
||||||
!folderName.Equals(trashName))
|
{
|
||||||
|
if (!folderName.Equals(trashName))
|
||||||
trashFolders[i]->ClearFlag(MSG_FOLDER_FLAG_TRASH);
|
trashFolders[i]->ClearFlag(MSG_FOLDER_FLAG_TRASH);
|
||||||
|
}
|
||||||
|
|
||||||
NS_RELEASE(trashFolders[i]);
|
NS_RELEASE(trashFolders[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4084,9 +4084,9 @@ nsresult nsImapMailFolder::SyncFlags(nsIImapFlagAndUidState *flagState)
|
||||||
if (flags & kImapMsgCustomKeywordFlag)
|
if (flags & kImapMsgCustomKeywordFlag)
|
||||||
{
|
{
|
||||||
nsXPIDLCString keywords;
|
nsXPIDLCString keywords;
|
||||||
if (NS_SUCCEEDED(flagState->GetCustomFlags(uidOfMessage, getter_Copies(keywords))) && !keywords.IsEmpty())
|
if (NS_SUCCEEDED(flagState->GetCustomFlags(uidOfMessage, getter_Copies(keywords))))
|
||||||
{
|
{
|
||||||
if (dbHdr && NS_SUCCEEDED(rv))
|
if (!keywords.IsEmpty() && dbHdr && NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
HandleCustomFlags(uidOfMessage, dbHdr, keywords);
|
HandleCustomFlags(uidOfMessage, dbHdr, keywords);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче