NS_WITH_SERVICE(nsIPref, prefs, NS_PREF_PROGID, &rv); if (NS_SUCCEEDED(rv)) {  prefs->GetBoolPref(kDisableXULCachePref, &gDisableXULCache); prefs->RegisterCallback(kDisableXULCachePref, DisableXULCacheChangedCallback, nsnull); }
nsXULContentUtils::Init(){    if (gRefCnt++ == 0) {        nsresult rv;        rv = nsServiceManager::GetService(kRDFServiceCID,                                          nsCOMTypeInfo<nsIRDFService>::GetIID(),                                          (nsISupports**) &gRDF);        if (NS_FAILED(rv)) return rv;        rv = nsComponentManager::CreateInstance(kNameSpaceManagerCID,                                                nsnull,                                                nsCOMTypeInfo<nsINameSpaceManager>::GetIID(),                                                (void**) &gNameSpaceManager);        if (NS_FAILED(rv)) return rv;        rv = nsComponentManager::CreateInstance(kDateTimeFormatCID,                                                nsnull,                                                nsCOMTypeInfo<nsIDateTimeFormat>::GetIID(),                                                (void**) &gFormat);        if (NS_FAILED(rv)) return rv;        kEventsAtom  = NS_NewAtom("events");        kTargetsAtom = NS_NewAtom("targets");        EventHandlerMapEntry* entry = kEventHandlerMap;        while (entry->mAttributeName) {            entry->mAttributeAtom = NS_NewAtom(entry->mAttributeName);            ++entry;        }    }    return NS_OK;}