nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv); if (NS_SUCCEEDED(rv)) rv = prefBranch->GetComplexValue(pref, NS_GET_IID(nsILocalFile), (void **)_retval); return rv;
nsXPIDLCString descriptorString; rv = CopyCharPref(aPref, getter_Copies(descriptorString)); if (NS_FAILED(rv)) return rv;  rv = file->SetPersistentDescriptor(descriptorString); NS_ENSURE_SUCCESS(rv, rv);  *aResult = file; NS_ADDREF(*aResult); return NS_OK;
NS_IMETHODIMP nsPref::GetFileXPref(const char *pref, nsILocalFile **_retval){  nsresult rv;  nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv);  if (NS_SUCCEEDED(rv))    rv = prefBranch->GetComplexValue(pref, NS_GET_IID(nsILocalFile), (void **)_retval);  return rv;}