Bug 1368738 - Use GetSpecIgnoringRef() in GetPrincipalSpec() in all protocols. r=aceman a=jorgk
authorJorg K <jorgk@jorgk.com>
Tue, 30 May 2017 23:44:33 +0200
changeset 27871 a60b2ce3bfb95c50fb5b6fc95408a55756dc4240
parent 27870 1ca6b6c3bb5f4ecbfcd54082ef1d7f07982eed3f
child 27872 d55124369888943e095aa0248817e1472c0c057e
push id1953
push usermozilla@jorgk.com
push dateWed, 31 May 2017 06:25:54 +0000
treeherdercomm-beta@d55124369888 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman, jorgk
bugs1368738
Bug 1368738 - Use GetSpecIgnoringRef() in GetPrincipalSpec() in all protocols. r=aceman a=jorgk
mailnews/imap/src/nsImapUrl.cpp
mailnews/jsaccount/src/JaUrl.cpp
mailnews/local/src/nsMailboxUrl.cpp
mailnews/news/src/nsNntpUrl.cpp
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -1190,17 +1190,17 @@ NS_IMETHODIMP nsImapUrl::GetPrincipalSpe
   // URLs look like this:
   // imap://user@domain@server:port/fetch>UID>folder>nn
   // We simply strip any query part beginning with ? & or /;
   // Normalised spec: imap://user@domain@server:port/fetch>UID>folder>nn
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsURL;
   QueryInterface(NS_GET_IID(nsIMsgMailNewsUrl), getter_AddRefs(mailnewsURL));
 
   nsAutoCString spec;
-  mailnewsURL->GetSpec(spec);
+  mailnewsURL->GetSpecIgnoringRef(spec);
 
   // Strip any query part beginning with ? & or /;
   int32_t ind = spec.Find("/;");
   if (ind != kNotFound)
     spec.SetLength(ind);
 
   ind = spec.FindChar('?');
   if (ind != kNotFound)
--- a/mailnews/jsaccount/src/JaUrl.cpp
+++ b/mailnews/jsaccount/src/JaUrl.cpp
@@ -101,17 +101,17 @@ NS_IMETHODIMP JaBaseCppUrl::SetOriginalS
 NS_IMETHODIMP JaBaseCppUrl::GetPrincipalSpec(nsACString& aPrincipalSpec)
 {
   // URLs contain a lot of query parts. We want need a normalised form:
   // scheme://server/folder?number=123
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsURL;
   QueryInterface(NS_GET_IID(nsIMsgMailNewsUrl), getter_AddRefs(mailnewsURL));
 
   nsAutoCString spec;
-  mailnewsURL->GetSpec(spec);
+  mailnewsURL->GetSpecIgnoringRef(spec);
 
   nsAutoCString queryPart = MsgExtractQueryPart(spec, "number=");
 
   // Strip any query part beginning with ? & or /;
   int32_t ind = spec.Find("/;");
   if (ind != kNotFound)
     spec.SetLength(ind);
 
--- a/mailnews/local/src/nsMailboxUrl.cpp
+++ b/mailnews/local/src/nsMailboxUrl.cpp
@@ -125,17 +125,17 @@ nsresult nsMailboxUrl::SetMessageSize(ui
 }
 
 NS_IMETHODIMP nsMailboxUrl::GetPrincipalSpec(nsACString& aPrincipalSpec)
 {
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsURL;
   QueryInterface(NS_GET_IID(nsIMsgMailNewsUrl), getter_AddRefs(mailnewsURL));
 
   nsAutoCString spec;
-  mailnewsURL->GetSpec(spec);
+  mailnewsURL->GetSpecIgnoringRef(spec);
 
   // mailbox: URLs contain a lot of query parts. We want need a normalised form:
   // mailbox:///path/to/folder?number=nn.
   // We also need to translate the second form mailbox://user@domain@server/folder?number=nn.
 
   char* messageKey = extractAttributeValue(spec.get(), "number=");
 
   // Strip any query part beginning with ? & or /;
--- a/mailnews/news/src/nsNntpUrl.cpp
+++ b/mailnews/news/src/nsNntpUrl.cpp
@@ -307,17 +307,17 @@ NS_IMETHODIMP nsNntpUrl::GetPrincipalSpe
   // URLs look like this:
   // news://server:port/folder?group=ggg&key=nnn [ &part=ppp &filename=fff ].
   // Just strip the part which will also remove the filename.
   // Normalised spec: news://server:port/folder?group=ggg&key=nnn
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsURL;
   QueryInterface(NS_GET_IID(nsIMsgMailNewsUrl), getter_AddRefs(mailnewsURL));
 
   nsAutoCString spec;
-  mailnewsURL->GetSpec(spec);
+  mailnewsURL->GetSpecIgnoringRef(spec);
   int32_t ind = spec.Find("&part");
   if (ind != kNotFound)
     spec.SetLength(ind);
   aPrincipalSpec.Assign(spec);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsNntpUrl::SetUri(const char * aURI)