Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc

This commit is contained in:
jaggernaut%netscape.com 2007-09-06 22:01:10 +00:00
Родитель ec31803a28
Коммит 2dd1ffa6e3
2 изменённых файлов: 11 добавлений и 11 удалений

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

@ -642,7 +642,7 @@ InternetSearchDataSource::FireTimer(nsITimer* aTimer, void* aClosure)
if (!engineContext) return;
nsCOMPtr<nsIURI> uri;
if (NS_FAILED(rv = NS_NewURI(getter_AddRefs(uri), updateURL))) return;
if (NS_FAILED(rv = NS_NewURI(getter_AddRefs(uri), updateURL.get()))) return;
nsCOMPtr<nsIChannel> channel;
if (NS_FAILED(rv = NS_OpenURI(getter_AddRefs(channel), uri, nsnull))) return;
@ -1037,7 +1037,7 @@ InternetSearchDataSource::GetTarget(nsIRDFResource *source,
nsCOMPtr<nsIRDFResource> category;
nsCAutoString caturiC;
caturiC.AssignWithConversion(catURI);
if (NS_FAILED(rv = gRDFService->GetResource(caturiC,
if (NS_FAILED(rv = gRDFService->GetResource(caturiC.get(),
getter_AddRefs(category))))
return(rv);
@ -1154,7 +1154,7 @@ InternetSearchDataSource::GetTargets(nsIRDFResource *source,
nsCOMPtr<nsIRDFResource> category;
nsCAutoString caturiC;
caturiC.AssignWithConversion(catURI);
if (NS_FAILED(rv = gRDFService->GetResource(caturiC,
if (NS_FAILED(rv = gRDFService->GetResource(caturiC.get(),
getter_AddRefs(category))))
return(rv);
@ -2448,7 +2448,7 @@ InternetSearchDataSource::GetInternetSearchURL(const char *searchEngineURI,
char *charsetData = nsnull;
nsCAutoString queryencodingstrC;
queryencodingstrC.AssignWithConversion(queryEncodingStr);
if (NS_SUCCEEDED(rv = textToSubURI->ConvertAndEscape(queryencodingstrC, uni, &charsetData)) && (charsetData))
if (NS_SUCCEEDED(rv = textToSubURI->ConvertAndEscape(queryencodingstrC.get(), uni, &charsetData)) && (charsetData))
{
text.AssignWithConversion(charsetData);
Recycle(charsetData);
@ -2641,7 +2641,7 @@ InternetSearchDataSource::FindInternetSearchResults(const char *url, PRBool *sea
nsCAutoString aCharset;
aCharset.AssignWithConversion(mQueryEncodingStr);
PRUnichar *uni = nsnull;
if (NS_SUCCEEDED(rv = textToSubURI->UnEscapeAndConvert(aCharset, escapedSearchText, &uni)) && (uni))
if (NS_SUCCEEDED(rv = textToSubURI->UnEscapeAndConvert(aCharset.get(), escapedSearchText.get(), &uni)) && (uni))
{
char *convertedSearchText = nsnull;
if (NS_SUCCEEDED(rv = textToSubURI->ConvertAndEscape("UTF-8", uni, &convertedSearchText)))
@ -2652,7 +2652,7 @@ InternetSearchDataSource::FindInternetSearchResults(const char *url, PRBool *sea
unescapedSearchText.ReplaceSubstring("%25", "+");
unescapedSearchText.ReplaceSubstring("%2B25", "%25");
searchText.AssignWithConversion(unescapedSearchText);
searchText.AssignWithConversion(unescapedSearchText.get());
Recycle(convertedSearchText);
}
@ -3557,7 +3557,7 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
char *charsetData = nsnull;
nsCAutoString queryencodingstrC;
queryencodingstrC.AssignWithConversion(queryEncodingStr);
if (NS_SUCCEEDED(rv = textToSubURI->ConvertAndEscape(queryencodingstrC, uni, &charsetData))
if (NS_SUCCEEDED(rv = textToSubURI->ConvertAndEscape(queryencodingstrC.get(), uni, &charsetData))
&& (charsetData))
{
textTemp.AssignWithConversion(charsetData);
@ -3624,7 +3624,7 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
nsCAutoString poststrC;
poststrC.AssignWithConversion(postStr);
if (NS_SUCCEEDED(rv = NS_NewPostDataStream(getter_AddRefs(postDataStream),
PR_FALSE, poststrC, 0)))
PR_FALSE, poststrC.get(), 0)))
{
nsCOMPtr<nsIUploadChannel> uploadChannel(do_QueryInterface(httpChannel));
NS_ASSERTION(uploadChannel, "http must support nsIUploadChannel");
@ -4631,7 +4631,7 @@ InternetSearchDataSource::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
}
// download it!
AddSearchEngine(updateURL, updateIconURL, nsnull, nsnull);
AddSearchEngine(updateURL.get(), updateIconURL.get(), nsnull, nsnull);
}
else
{
@ -5030,7 +5030,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, nsIRD
nsCAutoString hrefstrC;
hrefstrC.AssignWithConversion(hrefStr);
if (NS_SUCCEEDED(rv = NS_MakeAbsoluteURI(&absURIStr, hrefstrC, aURL))
if (NS_SUCCEEDED(rv = NS_MakeAbsoluteURI(&absURIStr, hrefstrC.get(), aURL))
&& (absURIStr))
{
hrefStr.AssignWithConversion(absURIStr);

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

@ -504,7 +504,7 @@ LocalSearchDataSource::parseFindURL(nsIRDFResource *u, nsISupportsArray *array)
dsName.AssignWithConversion(tokens[0].value);
nsCOMPtr<nsIRDFDataSource> datasource;
rv = gRDFService->GetDataSource(dsName, getter_AddRefs(datasource));
rv = gRDFService->GetDataSource(dsName.get(), getter_AddRefs(datasource));
if (NS_FAILED(rv))
return rv;