mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
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:
parent
6860a0a739
commit
28dcc72e46
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user