if (gRefCnt++ == 0) { nsresult rv = nsServiceManager::GetService( kRDFServiceCID, kIRDFServiceIID, (nsISupports**) &gRDFService );  if ( NS_SUCCEEDED ( rv) ) { gRDFService->GetResource( kURINC_WindowMediatorRoot,   &kNC_WindowMediatorRoot ); gRDFService->GetResource (kURINC_Name, &kNC_Name ); gRDFService->GetResource( kURINC_URL, &kNC_URL ); } else {   } }
nsresult rv; rv = Init(); NS_ASSERTION(NS_SUCCEEDED(rv), "uh oh, couldn't Init() for some reason");
nsWindowMediator::nsWindowMediator() :	mTimeStamp( 0 ), mEnumeratorList(), mWindowList(){	 NS_INIT_REFCNT();	 if (gRefCnt++ == 0)	 {      nsresult rv = nsServiceManager::GetService( kRDFServiceCID, kIRDFServiceIID, (nsISupports**) &gRDFService );			if ( NS_SUCCEEDED ( rv) )			{				gRDFService->GetResource( kURINC_WindowMediatorRoot,   &kNC_WindowMediatorRoot );				gRDFService->GetResource (kURINC_Name, &kNC_Name );				gRDFService->GetResource( kURINC_URL, &kNC_URL );    	}    	else    	{    		// Really can't do much since we don't have exceptions. Did go through    		// and add checks for null    	}    }}