265333 don't explicitly pass all arguments to NS_NewInputStreamChannel, so that the

more efficient variant with fewer arguments can be used r+sr=darin
This commit is contained in:
cbiesinger%web.de 2004-10-25 22:08:09 +00:00
Родитель 0959e63d6d
Коммит cbb3297fbe
9 изменённых файлов: 9 добавлений и 23 удалений

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

@ -400,8 +400,7 @@ nsresult nsJSChannel::Init(nsIURI *aURI)
// If the resultant script evaluation actually does return a value, we
// treat it as html.
rv = NS_NewInputStreamChannel(getter_AddRefs(channel), aURI, mIOThunk,
NS_LITERAL_CSTRING("text/html"),
EmptyCString());
NS_LITERAL_CSTRING("text/html"));
if (NS_FAILED(rv)) return rv;
rv = mIOThunk->Init(aURI);

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

@ -1112,14 +1112,10 @@ nsMessenger::SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity,
if (NS_FAILED(rv))
goto done;
const nsAFlatCString& empty = EmptyCString();
saveListener->m_channel = nsnull;
rv = NS_NewInputStreamChannel(getter_AddRefs(saveListener->m_channel),
url,
nsnull, // inputStream
empty, // contentType
empty); // contentCharset
nsnull); // inputStream
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_NewInputStreamChannel failed");
if (NS_FAILED(rv))
goto done;

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

@ -57,8 +57,7 @@ nsAboutBlank::NewChannel(nsIURI *aURI, nsIChannel **result)
if (NS_FAILED(rv)) return rv;
rv = NS_NewInputStreamChannel(&channel, aURI, in,
NS_LITERAL_CSTRING("text/html"),
EmptyCString());
NS_LITERAL_CSTRING("text/html"));
if (NS_FAILED(rv)) return rv;
*result = channel;

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

@ -148,8 +148,7 @@ nsAboutBloat::NewChannel(nsIURI *aURI, nsIChannel **result)
nsIChannel* channel;
rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
NS_LITERAL_CSTRING("text/plain"),
EmptyCString());
NS_LITERAL_CSTRING("text/plain"));
if (NS_FAILED(rv)) return rv;
*result = channel;

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

@ -145,8 +145,7 @@ nsAboutCache::NewChannel(nsIURI *aURI, nsIChannel **result)
nsIChannel* channel;
rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
NS_LITERAL_CSTRING("text/html"),
EmptyCString());
NS_LITERAL_CSTRING("text/html"));
if (NS_FAILED(rv)) return rv;
*result = channel;

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

@ -114,8 +114,7 @@ nsFTPDirListingConv::AsyncConvertData(const char *aFromType, const char *aToType
rv = NS_NewInputStreamChannel(&mPartChannel,
uri,
nsnull,
NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT),
EmptyCString());
NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT));
NS_RELEASE(uri);
if (NS_FAILED(rv)) return rv;

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

@ -149,8 +149,7 @@ nsGopherDirListingConv::AsyncConvertData(const char *aFromType,
rv = NS_NewInputStreamChannel(&mPartChannel,
mUri,
nsnull,
NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT),
EmptyCString());
NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT));
if (NS_FAILED(rv)) return rv;
return NS_OK;

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

@ -215,11 +215,8 @@ RunTest(nsIFile *file)
if (uri)
uri->SetSpec(NS_LITERAL_CSTRING("foo://bar"));
const nsAFlatCString& empty = EmptyCString();
nsCOMPtr<nsIChannel> chan;
rv = NS_NewInputStreamChannel(getter_AddRefs(chan), uri, stream, empty,
empty);
rv = NS_NewInputStreamChannel(getter_AddRefs(chan), uri, stream);
if (NS_FAILED(rv)) return rv;
rv = chan->SetNotificationCallbacks(new MyCallbacks());

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

@ -147,8 +147,7 @@ nsRDFXMLParser::ParseString(nsIRDFDataSource* aSink, nsIURI* aBaseURI, const nsA
nsCOMPtr<nsIChannel> channel;
rv = NS_NewInputStreamChannel(getter_AddRefs(channel), aBaseURI, stream,
NS_LITERAL_CSTRING("text/xml"),
EmptyCString());
NS_LITERAL_CSTRING("text/xml"));
if (NS_FAILED(rv)) return rv;
listener->OnStartRequest(channel, nsnull);