nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv); if (NS_SUCCEEDED(rv)) rv = prefBranch->SetComplexValue(pref, NS_GET_IID(nsILocalFile), value); return rv;
rv = aValue->GetPersistentDescriptor(getter_Copies(descriptorString)); NS_ENSURE_SUCCESS(rv, rv);  rv = SetCharPref(aPref, descriptorString); NS_ENSURE_SUCCESS(rv, rv);  return NS_OK;
NS_IMETHODIMP nsPref::SetFileXPref(const char *pref, nsILocalFile *value){  nsresult rv;  nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv);  if (NS_SUCCEEDED(rv))    rv = prefBranch->SetComplexValue(pref, NS_GET_IID(nsILocalFile), value);  return rv;}