bug #75504; sr=jband. simple fixes correcting where people inappropriately applied |getter_AddRefs|, in this case fixing the leak applying brendan's suggestion

This commit is contained in:
scc%mozilla.org 2001-05-03 10:13:59 +00:00
Родитель 6860a0a739
Коммит 28dcc72e46
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -239,10 +239,10 @@ nsStreamTransfer::SelectFile( nsIDOMWindowInternal *parent, nsILocalFile **aResu
nsCID cid = NS_STRINGBUNDLESERVICE_CID;
NS_WITH_SERVICE( nsIStringBundleService, bundleService, cid, &rv );
if ( NS_SUCCEEDED( rv ) ) {
nsIStringBundle *bundle;
nsCOMPtr<nsIStringBundle> bundle;
PRUnichar *pString;
rv = bundleService->CreateBundle( "chrome://global/locale/downloadProgress.properties",
getter_AddRefs( &bundle ) );
getter_AddRefs(bundle) );
if ( NS_SUCCEEDED( rv ) ) {
rv = bundle->GetStringFromName( NS_ConvertASCIItoUCS2( "FilePickerTitle" ).GetUnicode(),
&pString );
@ -267,7 +267,7 @@ nsStreamTransfer::SelectFile( nsIDOMWindowInternal *parent, nsILocalFile **aResu
if ( rc != nsIFilePicker::returnCancel ) {
// Give result to caller.
rv = picker->GetFile( getter_AddRefs( aResult ) );
rv = picker->GetFile( aResult );
if ( NS_SUCCEEDED( rv ) && prefs ) {
// Save selected directory for next time.