res = rdfServ->RegisterDataSource(this, PR_FALSE);
res = rdfUtil->MakeSeq(mInner, kNC_BrowserAutodetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_BrowserCharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_BrowserMoreCharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore1CharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore2CharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore3CharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore4CharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore5CharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_MaileditCharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_MailviewCharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_ComposerCharsetMenuRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_DecodersRoot, NULL); if (NS_FAILED(res)) goto done; res = rdfUtil->MakeSeq(mInner, kNC_EncodersRoot, NULL); if (NS_FAILED(res)) goto done;
nsresult nsCharsetMenu::Init() {  nsresult res = NS_OK;  nsIRDFService * rdfServ = NULL;  nsIRDFContainerUtils * rdfUtil = NULL;  res = nsServiceManager::GetService(kRDFServiceCID, NS_GET_IID(nsIRDFService),       (nsISupports **)&rdfServ);  if (NS_FAILED(res)) goto done;  rdfServ->GetResource(kURINC_BrowserCharsetMenuRoot, &kNC_BrowserCharsetMenuRoot);  rdfServ->GetResource(kURINC_BrowserMoreCharsetMenuRoot, &kNC_BrowserMoreCharsetMenuRoot);  rdfServ->GetResource(kURINC_BrowserMore1CharsetMenuRoot, &kNC_BrowserMore1CharsetMenuRoot);  rdfServ->GetResource(kURINC_BrowserMore2CharsetMenuRoot, &kNC_BrowserMore2CharsetMenuRoot);  rdfServ->GetResource(kURINC_BrowserMore3CharsetMenuRoot, &kNC_BrowserMore3CharsetMenuRoot);  rdfServ->GetResource(kURINC_BrowserMore4CharsetMenuRoot, &kNC_BrowserMore4CharsetMenuRoot);  rdfServ->GetResource(kURINC_BrowserMore5CharsetMenuRoot, &kNC_BrowserMore5CharsetMenuRoot);  rdfServ->GetResource(kURINC_MaileditCharsetMenuRoot, &kNC_MaileditCharsetMenuRoot);  rdfServ->GetResource(kURINC_MailviewCharsetMenuRoot, &kNC_MailviewCharsetMenuRoot);  rdfServ->GetResource(kURINC_ComposerCharsetMenuRoot, &kNC_ComposerCharsetMenuRoot);  rdfServ->GetResource(kURINC_Name, &kNC_Name);  rdfServ->GetResource(kURINC_Checked, &kNC_Checked);  rdfServ->GetResource(kURINC_CharsetDetector, &kNC_CharsetDetector);  rdfServ->GetResource(kURINC_BookmarkSeparator, &kNC_BookmarkSeparator);  rdfServ->GetResource(kURINC_type, &kRDF_type);  res = nsComponentManager::CreateInstance(kRDFInMemoryDataSourceCID, nsnull,     NS_GET_IID(nsIRDFDataSource), (void**) &mInner);  if (NS_FAILED(res)) goto done;  res = nsServiceManager::GetService(kRDFContainerUtilsCID,     NS_GET_IID(nsIRDFContainerUtils), (nsISupports **)&rdfUtil);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_BrowserCharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_BrowserMoreCharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore1CharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore2CharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore3CharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore4CharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_BrowserMore5CharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_MaileditCharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_MailviewCharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfUtil->MakeSeq(mInner, kNC_ComposerCharsetMenuRoot, NULL);  if (NS_FAILED(res)) goto done;  res = rdfServ->RegisterDataSource(this, PR_FALSE);done:  if (rdfServ != NULL) nsServiceManager::ReleaseService(kRDFServiceCID,       rdfServ);  if (rdfUtil != NULL) nsServiceManager::ReleaseService(kRDFContainerUtilsCID,       rdfUtil);  return res;}