nsresult rv; nsCOMPtr<nsISupportsWString> theString;  rv = mDefaultBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsWString), getter_AddRefs(theString)); if (NS_SUCCEEDED(rv)) { rv = theString->GetData(_retval); } return rv;
if (NS_FAILED(SecurePrefCheck(pref))) return NS_ERROR_FAILURE; nsresult rv;  nsXPIDLCString utf8String; rv = CopyDefaultCharPref(pref, getter_Copies(utf8String)); if (NS_FAILED(rv)) return rv;  return convertUTF8ToUnicode(utf8String, return_buf);
NS_IMETHODIMP nsPref::CopyDefaultUnicharPref(const char *pref, PRUnichar **_retval){  nsresult rv;  nsCOMPtr<nsISupportsWString> theString;  rv = mDefaultBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsWString),                                       getter_AddRefs(theString));  if (NS_SUCCEEDED(rv)) {    rv = theString->GetData(_retval);  }  return rv;}