Bug 1489566 - Bug 1488628: Change arguments of nsIWebNavigation::LoadURI(). rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Fri, 07 Sep 2018 19:11:42 +0200
changeset 33090 489af20156c6c8b5077faf5ab918a05fb57ced41
parent 33089 2a29ee0adb310b54a6a2df72034953fed8f2b043
child 33091 38e2a60486af46320c357b412e42a0bba97ffca6
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbustage-fix
bugs1489566, 1488628
Bug 1489566 - Bug 1488628: Change arguments of nsIWebNavigation::LoadURI(). rs=bustage-fix
mailnews/base/src/nsMessenger.cpp
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/src/nsMsgWindow.cpp
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -473,18 +473,18 @@ nsMessenger::OpenURL(const nsACString& a
     AddMsgUrlToNavigateHistory(aURL);
     mLastDisplayURI = aURL; // remember the last uri we displayed....
     return NS_OK;
   }
 
   nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
   if(!webNav)
     return NS_ERROR_FAILURE;
-  rv = webNav->LoadURI(NS_ConvertASCIItoUTF16(aURL).get(),   // URI string
-                       nsIWebNavigation::LOAD_FLAGS_IS_LINK, // Load flags
+  rv = webNav->LoadURI(NS_ConvertASCIItoUTF16(aURL),          // URI string
+                       nsIWebNavigation::LOAD_FLAGS_IS_LINK,  // Load flags
                        nullptr,                               // Referring URI
                        nullptr,                               // Post stream
                        nullptr,                               // Extra headers
                        nsContentUtils::GetSystemPrincipal());
   return rv;
 }
 
 NS_IMETHODIMP nsMessenger::LaunchExternalURL(const nsACString& aURL)
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -488,18 +488,18 @@ nsMsgPrintEngine::FireThatLoadOperation(
     rv = messageService->DisplayMessageForPrinting(uriCStr.get(), mDocShell, nullptr, nullptr,
                                                    getter_AddRefs(dummyNull));
   }
   //If it's not something we know about, then just load try loading it directly.
   else
   {
     nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
     if (webNav)
-      rv = webNav->LoadURI(uri.get(),                        // URI string
-                           nsIWebNavigation::LOAD_FLAGS_NONE, // Load flags
+      rv = webNav->LoadURI(uri,                                // URI string
+                           nsIWebNavigation::LOAD_FLAGS_NONE,  // Load flags
                            nullptr,                            // Referring URI
                            nullptr,                            // Post data
                            nullptr,                            // Extra headers
                            nsContentUtils::GetSystemPrincipal());
   }
   return rv;
 }
 
--- a/mailnews/base/src/nsMsgWindow.cpp
+++ b/mailnews/base/src/nsMsgWindow.cpp
@@ -500,17 +500,17 @@ nsMsgWindow::DisplayURIInMessagePane(con
 
   nsCOMPtr <nsIDocShell> docShell;
   GetMessageWindowDocShell(getter_AddRefs(docShell));
   NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
   NS_ENSURE_TRUE(webNav, NS_ERROR_FAILURE);
 
-  return webNav->LoadURI(uri, nsIWebNavigation::LOAD_FLAGS_NONE,
+  return webNav->LoadURI(nsDependentString(uri), nsIWebNavigation::LOAD_FLAGS_NONE,
                          nullptr, nullptr, nullptr,
                          principal);
 }
 
 NS_IMETHODIMP
 nsMsgWindow::DisplayHTMLInMessagePane(const nsAString& title, const nsAString& body, bool clearMsgHdr)
 {
   nsString htmlStr;