NS_WITH_SERVICE(nsIPref, pref, NS_PREF_PROGID, &res); if (NS_FAILED(res)) return res;
res = AddFromPrefsToMenu(NULL, container, kMaileditPrefKey, mEncoderList, NULL); NS_ASSERTION(NS_SUCCEEDED(res), "error initializing mailedit charset menu from prefs");
nsresult nsCharsetMenu::InitMaileditMenu() {  nsresult res = NS_OK;  NS_WITH_SERVICE(nsIRDFService, rdfServ, kRDFServiceCID, &res);  if (NS_FAILED(res)) return res;  NS_WITH_SERVICE(nsICharsetConverterManager2, ccMan, kCharsetConverterManagerCID, &res);  if (NS_FAILED(res)) return res;  nsCOMPtr<nsISupportsArray> encs;  res = ccMan->GetEncoderList(getter_AddRefs(encs));  if (NS_FAILED(res)) return res;  nsCOMPtr<nsIRDFContainer> container;  res = NewRDFContainer(mInner, kNC_MaileditCharsetMenuRoot, getter_AddRefs(container));  if (NS_FAILED(res)) return res;  NS_WITH_SERVICE(nsIPref, pref, NS_PREF_PROGID, &res);  if (NS_FAILED(res)) return res;  char * prefKey = "intl.charsetmenu.mailedit";  res = AddFromPrefsToMenu(pref, rdfServ, ccMan, NULL, container, prefKey,       encs, NULL);  NS_ASSERTION(NS_SUCCEEDED(res), "error initializing mailedit charset menu from prefs");  return res;}