if (gRefCnt++ == 0) { nsresult rv = nsServiceManager::GetService(kRDFServiceCID, kIRDFServiceIID, (nsISupports**) &gRDFService);  gRDFService->GetResource(kURINC_URL,             &kNC_URL); gRDFService->GetResource(kURINC_ShortcutURL,     &kNC_ShortcutURL); gRDFService->GetResource(kURINC_Bookmark,        &kNC_Bookmark); gRDFService->GetResource(kURINC_BookmarksRoot,   &kNC_BookmarksRoot); gRDFService->GetResource(kURINC_IEFavoritesRoot, &kNC_IEFavoritesRoot); gRDFService->GetResource(kURIRDF_type,           &kRDF_type); gRDFService->GetResource(kURINC_Folder,          &kNC_Folder); }
bm_AddRefGlobals();
BookmarkDataSourceImpl::BookmarkDataSourceImpl(void){	// XXX rvg there should be only one instance of this class. 	// this is actually true of all datasources.	NS_INIT_REFCNT();	if (gRefCnt++ == 0)	{		nsresult rv = nsServiceManager::GetService(kRDFServiceCID,						kIRDFServiceIID,						(nsISupports**) &gRDFService);		gRDFService->GetResource(kURINC_URL,             &kNC_URL);		gRDFService->GetResource(kURINC_ShortcutURL,     &kNC_ShortcutURL);		gRDFService->GetResource(kURINC_Bookmark,        &kNC_Bookmark);		gRDFService->GetResource(kURINC_BookmarksRoot,   &kNC_BookmarksRoot);		gRDFService->GetResource(kURINC_IEFavoritesRoot, &kNC_IEFavoritesRoot);		gRDFService->GetResource(kURIRDF_type,           &kRDF_type);		gRDFService->GetResource(kURINC_Folder,          &kNC_Folder);	}}