Bug 1084481 - "Build error: 'NS_NewInputStreamChannel' : no overloaded function takes 4 arguments" r=jcranmer, a=jcranmer

This commit is contained in:
ISHIKAWA, Chiaki 2014-10-19 01:26:00 -05:00
Родитель 79437a2d7a
Коммит 0eaf220416
5 изменённых файлов: 66 добавлений и 6 удалений

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

@ -95,8 +95,17 @@ nsAddbookProtocolHandler::GenerateXMLOutputChannel( nsString &aOutput,
NS_ConvertUTF16toUTF8 utf8String(aOutput.get());
rv = inStr->SetData(utf8String.get(), utf8String.Length());
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIPrincipal> nullPrincipal =
do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "CreateInstance of nullprincipalfailed.");
if (NS_FAILED(rv))
return rv;
rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
nullPrincipal, nsILoadInfo::SEC_NORMAL,
nsIContentPolicy::TYPE_OTHER,
NS_LITERAL_CSTRING("text/xml"));
NS_ENSURE_SUCCESS(rv, rv);
@ -140,8 +149,15 @@ nsAddbookProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
pipe->GetOutputStream(getter_AddRefs(pipeOut));
pipeOut->Close();
nsCOMPtr<nsIPrincipal> nullPrincipal =
do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "CreateInstance of nullprincipal failed.");
if (NS_FAILED(rv))
return rv;
return NS_NewInputStreamChannel(_retval, aURI, pipeIn,
nullPrincipal, nsILoadInfo::SEC_NORMAL, nsIContentPolicy::TYPE_OTHER,
NS_LITERAL_CSTRING("application/x-addvcard"));
}

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

@ -1043,11 +1043,20 @@ nsMessenger::SaveAs(const nsACString& aURI, bool aAsFile,
if (NS_FAILED(rv))
goto done;
nsCOMPtr<nsIPrincipal> nullPrincipal =
do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "CreateInstance of nullprincipal failed");
if (NS_FAILED(rv))
goto done;
saveListener->m_channel = nullptr;
rv = NS_NewInputStreamChannel(getter_AddRefs(saveListener->m_channel),
url,
nullptr); // inputStream
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_NewInputStreamChannel failed");
url,
nullptr,
nullPrincipal,
nsILoadInfo::SEC_NORMAL,
nsIContentPolicy::TYPE_OTHER);
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_NewChannel failed");
if (NS_FAILED(rv))
goto done;

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

@ -552,8 +552,22 @@ nsMsgAttachmentHandler::SnarfMsgAttachment(nsMsgCompFields *compFields)
nsCOMPtr<nsIURI> aURL;
rv = messageService->GetUrlForUri(uri.get(), getter_AddRefs(aURL), nullptr);
if (NS_FAILED(rv))
goto done;
rv = NS_NewInputStreamChannel(getter_AddRefs(m_converter_channel), aURL, nullptr);
nsCOMPtr<nsIPrincipal> nullPrincipal =
do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "CreateInstance of nullprincipal failed.");
if (NS_FAILED(rv))
goto done;
rv = NS_NewInputStreamChannel(getter_AddRefs(m_converter_channel),
aURL,
nullptr,
nullPrincipal,
nsILoadInfo::SEC_NORMAL,
nsIContentPolicy::TYPE_OTHER);
if (NS_FAILED(rv))
goto done;

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

@ -1596,9 +1596,22 @@ nsMsgComposeService::RunMessageThroughMimeDraft(
}
}
nsCOMPtr<nsIPrincipal> nullPrincipal =
do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "CreateInstance of nullprincipal failed");
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIChannel> channel;
rv = NS_NewInputStreamChannel(getter_AddRefs(channel), url, nullptr);
NS_ENSURE_SUCCESS(rv, rv);
rv = NS_NewInputStreamChannel(getter_AddRefs(channel),
url,
nullptr,
nullPrincipal,
nsILoadInfo::SEC_NORMAL,
nsIContentPolicy::TYPE_OTHER);
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_NewChannel failed.");
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIStreamConverter> converter = do_QueryInterface(mimeConverter);
rv = converter->AsyncConvertData(nullptr, nullptr, nullptr, channel);

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

@ -334,7 +334,15 @@ NS_IMETHODIMP nsSmtpService::NewChannel(nsIURI *aURI, nsIChannel **_retval)
pipeOut->Close();
nsCOMPtr<nsIPrincipal> nullPrincipal =
do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "CreateInstance of nullprincipal failed.");
if (NS_FAILED(rv))
return rv;
return NS_NewInputStreamChannel(_retval, aURI, pipeIn,
nullPrincipal, nsILoadInfo::SEC_NORMAL,
nsIContentPolicy::TYPE_OTHER,
NS_LITERAL_CSTRING("application/x-mailto"));
}