Bug 1368738 - Use GetSpecIgnoringRef() in GetPrincipalSpec() in all protocols. r=aceman
authorJorg K <jorgk@jorgk.com>
Tue, 30 May 2017 23:44:33 +0200
changeset 28240 2662981ddb0984098f4e74844ac7e973ac7fab80
parent 28239 4c24e9125fc97770564ad6c9d18340cc3ec2e71e
child 28241 069cc93a3e3bd88d682e7899dc5b53722a174d2b
push id1966
push userclokep@gmail.com
push dateMon, 12 Jun 2017 16:57:35 +0000
treeherdercomm-beta@32d9b8d10da1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman
bugs1368738
Bug 1368738 - Use GetSpecIgnoringRef() in GetPrincipalSpec() in all protocols. r=aceman
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)