if (gRefCnt++ == 0) { nsresult rv;  rv = nsServiceManager::GetService(kRDFServiceCID, nsIRDFService::GetIID(), (nsISupports**) &gRDFService);  NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service"); if (NS_SUCCEEDED(rv)) { gRDFService->GetResource(RDF_NAMESPACE_URI "nextVal", &kRDF_nextVal); }  rv = nsServiceManager::GetService(kRDFContainerUtilsCID, nsIRDFContainerUtils::GetIID(), (nsISupports**) &gRDFContainerUtils);  NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF container utils service"); }
RDFContainerImpl::RDFContainerImpl()    : mDataSource(nsnull), mContainer(nsnull){    NS_INIT_REFCNT();    if (gRefCnt++ == 0) {        nsresult rv;        rv = nsServiceManager::GetService(kRDFServiceCID,                                          nsIRDFService::GetIID(),                                          (nsISupports**) &gRDFService);        NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service");        if (NS_SUCCEEDED(rv)) {            gRDFService->GetResource(RDF_NAMESPACE_URI "nextVal", &kRDF_nextVal);        }        rv = nsServiceManager::GetService(kRDFContainerUtilsCID,                                          nsIRDFContainerUtils::GetIID(),                                          (nsISupports**) &gRDFContainerUtils);        NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF container utils service");    }}