Bug 1412421 - Change some nsAuto[C]String parameters back to ns[C]String. r=erahm

This commit is contained in:
Jorg K 2017-10-28 00:24:11 +02:00
Родитель e95386a6de
Коммит 825d0ae5e6
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -2105,10 +2105,10 @@ NS_MSG_BASE nsMsgKey msgKeyFromInt(uint64_t aValue)
} }
// Helper function to extract a query qualifier. // Helper function to extract a query qualifier.
nsAutoCString MsgExtractQueryPart(nsAutoCString spec, const char* queryToExtract) nsCString MsgExtractQueryPart(const nsACString& spec, const char* queryToExtract)
{ {
nsAutoCString queryPart; nsCString queryPart;
int32_t queryIndex = spec.Find(queryToExtract); int32_t queryIndex = nsPromiseFlatCString(spec).Find(queryToExtract);
if (queryIndex == kNotFound) if (queryIndex == kNotFound)
return queryPart; return queryPart;

Просмотреть файл

@ -372,7 +372,7 @@ NS_MSG_BASE nsMsgKey msgKeyFromInt(uint64_t aValue);
/** /**
* Helper function to extract query part from URL spec. * Helper function to extract query part from URL spec.
*/ */
nsAutoCString MsgExtractQueryPart(nsAutoCString spec, const char* queryToExtract); nsCString MsgExtractQueryPart(const nsACString& spec, const char* queryToExtract);
/** /**
* Helper macro for defining getter/setters. Ported from nsISupportsObsolete.h * Helper macro for defining getter/setters. Ported from nsISupportsObsolete.h

Просмотреть файл

@ -9361,7 +9361,7 @@ nsresult nsImapMockChannel::OpenCacheEntry()
// ?section=2?part=1.2&filename=A01.JPG&type=image/jpeg&filename=A01.JPG // ?section=2?part=1.2&filename=A01.JPG&type=image/jpeg&filename=A01.JPG
// ?part=1.2&type=image/jpeg&filename=IMG_C0030.jpg // ?part=1.2&type=image/jpeg&filename=IMG_C0030.jpg
// ?header=quotebody&part=1.2&filename=lijbmghmkilicioj.png // ?header=quotebody&part=1.2&filename=lijbmghmkilicioj.png
nsAutoCString partQuery = MsgExtractQueryPart(path, "?part="); nsCString partQuery = MsgExtractQueryPart(path, "?part=");
if (partQuery.IsEmpty()) { if (partQuery.IsEmpty()) {
partQuery = MsgExtractQueryPart(path, "&part="); partQuery = MsgExtractQueryPart(path, "&part=");
if (!partQuery.IsEmpty()) { if (!partQuery.IsEmpty()) {
@ -9369,7 +9369,7 @@ nsresult nsImapMockChannel::OpenCacheEntry()
partQuery.SetCharAt('?', 0); partQuery.SetCharAt('?', 0);
} }
} }
nsAutoCString filenameQuery = MsgExtractQueryPart(path, "&filename="); nsCString filenameQuery = MsgExtractQueryPart(path, "&filename=");
// Truncate path at either /; or ? // Truncate path at either /; or ?
int32_t ind = path.FindChar('?'); int32_t ind = path.FindChar('?');

Просмотреть файл

@ -108,7 +108,7 @@ NS_IMETHODIMP JaBaseCppUrl::GetPrincipalSpec(nsACString& aPrincipalSpec)
nsAutoCString spec; nsAutoCString spec;
mailnewsURL->GetSpecIgnoringRef(spec); mailnewsURL->GetSpecIgnoringRef(spec);
nsAutoCString queryPart = MsgExtractQueryPart(spec, "number="); nsCString queryPart = MsgExtractQueryPart(spec, "number=");
// Strip any query part beginning with ? or /; // Strip any query part beginning with ? or /;
int32_t ind = spec.Find("/;"); int32_t ind = spec.Find("/;");