Bug 1489566 - Follow-up: Convert 1st argument of DisplayURIInMessagePane() to nsAString. r=mkmelin

This commit is contained in:
Jorg K 2018-09-07 20:53:24 +02:00
Родитель 3d528e9514
Коммит 85618ab654
3 изменённых файлов: 5 добавлений и 5 удалений

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

@ -58,7 +58,7 @@ interface nsIMsgWindow : nsISupports {
*/
attribute nsIInterfaceRequestor notificationCallbacks;
void displayURIInMessagePane(in wstring uri, in boolean clearMsgHdr, in nsIPrincipal principal);
void displayURIInMessagePane(in AString uri, in boolean clearMsgHdr, in nsIPrincipal principal);
void displayHTMLInMessagePane(in AString title, in AString body, in boolean clearMsgHdr);

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

@ -493,7 +493,7 @@ NS_IMETHODIMP nsMsgWindow::SetPromptDialog(nsIPrompt* aPromptDialog)
}
NS_IMETHODIMP
nsMsgWindow::DisplayURIInMessagePane(const char16_t *uri, bool clearMsgHdr, nsIPrincipal *principal)
nsMsgWindow::DisplayURIInMessagePane(const nsAString& uri, bool clearMsgHdr, nsIPrincipal *principal)
{
if (clearMsgHdr && mMsgWindowCommands)
mMsgWindowCommands->ClearMsgPane();
@ -505,7 +505,7 @@ nsMsgWindow::DisplayURIInMessagePane(const char16_t *uri, bool clearMsgHdr, nsIP
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
NS_ENSURE_TRUE(webNav, NS_ERROR_FAILURE);
return webNav->LoadURI(nsDependentString(uri), nsIWebNavigation::LOAD_FLAGS_NONE,
return webNav->LoadURI(uri, nsIWebNavigation::LOAD_FLAGS_NONE,
nullptr, nullptr, nullptr,
principal);
}
@ -528,7 +528,7 @@ nsMsgWindow::DisplayHTMLInMessagePane(const nsAString& title, const nsAString& b
PR_FREEIF(encodedHtml);
return DisplayURIInMessagePane(NS_ConvertASCIItoUTF16(dataSpec).get(),
return DisplayURIInMessagePane(NS_ConvertASCIItoUTF16(dataSpec),
clearMsgHdr, nsContentUtils::GetSystemPrincipal());
}

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

@ -2007,7 +2007,7 @@ nsresult nsNNTPProtocol::SendFirstNNTPCommandResponse()
// call nsDocShell::Stop(STOP_NETWORK), which will eventually
// call nsNNTPProtocol::Cancel(), which will close the socket.
// we need to fix this, since the connection is still valid.
rv = m_msgWindow->DisplayURIInMessagePane(NS_ConvertASCIItoUTF16(uri).get(), true,
rv = m_msgWindow->DisplayURIInMessagePane(NS_ConvertASCIItoUTF16(uri), true,
nsContentUtils::GetSystemPrincipal());
NS_ENSURE_SUCCESS(rv,rv);
}