NS_WITH_SERVICE(nsIPref, pref, NS_PREF_PROGID, &res); if (NS_FAILED(res)) return res;  res = AddFromPrefsToMenu(pref, aRDFServ, aCCMan, aArray, container,
res = AddFromPrefsToMenu(aPref, aRDFServ, aCCMan, aArray, container,
nsresult nsCharsetMenu::InitStaticMenu(                        nsIRDFService * aRDFServ,                         nsICharsetConverterManager2 * aCCMan,                         nsISupportsArray * aDecs,                        nsIRDFResource * aResource,                         char * aKey,                         nsVoidArray * aArray){  nsresult res = NS_OK;  nsCOMPtr<nsIRDFContainer> container;  res = NewRDFContainer(mInner, aResource, getter_AddRefs(container));  if (NS_FAILED(res)) return res;  // XXX work around bug that causes the submenus to be first instead of last  res = AddSeparatorToContainer(aRDFServ, aCCMan, container);  NS_ASSERTION(NS_SUCCEEDED(res), "error adding separator to container");  res = InitChardetMenu(aRDFServ, aCCMan, container);  NS_ASSERTION(NS_SUCCEEDED(res), "error initializing chardet menu");  res = AddSeparatorToContainer(aRDFServ, aCCMan, container);  NS_ASSERTION(NS_SUCCEEDED(res), "error adding separator to container");  NS_WITH_SERVICE(nsIPref, pref, NS_PREF_PROGID, &res);  if (NS_FAILED(res)) return res;  res = AddFromPrefsToMenu(pref, aRDFServ, aCCMan, aArray, container,       aKey, aDecs, "charset.");  NS_ASSERTION(NS_SUCCEEDED(res), "error initializing charset menu from prefs");  return res;}