rv = compMgr->UnregisterComponent(kLanguageAtomServiceCID, path); if (NS_FAILED(rv)) goto done;
extern "C" NS_EXPORT nsresult NSUnregisterSelf(nsISupports* aServMgr, const char * path){  nsresult rv;  nsCOMPtr<nsIServiceManager> servMgr(do_QueryInterface(aServMgr, &rv));  if (NS_FAILED(rv)) return rv;  nsIComponentManager* compMgr;  rv = servMgr->GetService(kComponentManagerCID,                            NS_GET_IID(nsIComponentManager),                            (nsISupports**)&compMgr);  if (NS_FAILED(rv)) return rv;  rv = compMgr->UnregisterComponent(kLocaleFactoryCID, path);  if (NS_FAILED(rv)) goto done;  rv = compMgr->UnregisterComponent(kCollationFactoryCID, path);  if (NS_FAILED(rv)) goto done;  rv = compMgr->UnregisterComponent(kCollationCID, path);  if (NS_FAILED(rv)) goto done;  rv = compMgr->UnregisterComponent(kDateTimeFormatCID, path);  if (NS_FAILED(rv)) goto done;	rv = compMgr->UnregisterComponent(kScriptableDateFormatCID, path);	if (NS_FAILED(rv)) goto done;  done:  (void)servMgr->ReleaseService(kComponentManagerCID, compMgr);  return rv;}