NS_WITH_SERVICE(nsIRegistry, registry, kRegistryCID, &res); if (NS_FAILED(res)) return res;   PRBool regOpen = PR_FALSE; registry->IsOpen(&regOpen); if (!regOpen) { res = registry->OpenWellKnownRegistry(nsIRegistry::ApplicationComponentRegistry); if (NS_FAILED(res)) return res; }  RegisterConverterTitles(registry, NS_TITLE_BUNDLE_REGISTRY_KEY); RegisterConverterData(registry, NS_DATA_BUNDLE_REGISTRY_KEY);
RegisterConverterCategory(catman, NS_TITLE_BUNDLE_CATEGORY, "chrome: RegisterConverterCategory(catman, NS_DATA_BUNDLE_CATEGORY, "resource:/res/charsetData.properties");
nsresult nsCharsetConverterManager::RegisterConverterManagerData(){  nsresult res = NS_OK;  NS_WITH_SERVICE(nsIRegistry, registry, kRegistryCID, &res);  if (NS_FAILED(res)) return res;  // open registry if necessary  PRBool regOpen = PR_FALSE;  registry->IsOpen(&regOpen);  if (!regOpen) {    res = registry->OpenWellKnownRegistry(nsIRegistry::ApplicationComponentRegistry);    if (NS_FAILED(res)) return res;  }  RegisterConverterTitles(registry, NS_TITLE_BUNDLE_REGISTRY_KEY);  RegisterConverterData(registry, NS_DATA_BUNDLE_REGISTRY_KEY);  return NS_OK;}