Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
nsXULPrototypeCache.cpp File Reference
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
#include "nsContentUtils.h"
#include "nsICSSStyleSheet.h"
#include "nsIXULPrototypeCache.h"
#include "nsIXULPrototypeDocument.h"
#include "nsIXULDocument.h"
#include "nsIURI.h"
#include "nsIURL.h"
#include "plstr.h"
#include "nsIDocument.h"
#include "nsIXBLDocumentInfo.h"
#include "nsIServiceManager.h"
#include "nsXULDocument.h"
#include "nsIJSRuntimeService.h"
#include "jsapi.h"
#include "nsIChromeRegistry.h"
#include "nsIFastLoadService.h"
#include "nsIFastLoadFileControl.h"
#include "nsIFile.h"
#include "nsIObjectInputStream.h"
#include "nsIObjectOutputStream.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsNetUtil.h"
#include "nsURIHashKey.h"
#include "nsInterfaceHashtable.h"
#include "nsDataHashtable.h"
#include "nsAppDirectoryServiceDefs.h"
#include "jsxdrapi.h"

Go to the source code of this file.

Classes

class  nsXULPrototypeCache
class  nsXULFastLoadFileIO

Functions

 DisableXULCacheChangedCallback (const char *aPref, void *aClosure)
 NS_IMPL_THREADSAFE_ISUPPORTS2 (nsXULPrototypeCache, nsIXULPrototypeCache, nsIObserver) NS_IMETHODIMP NS_NewXULPrototypeCache(nsISupports *aOuter
 FastLoadPrefChangedCallback (const char *aPref, void *aClosure)

Variables

static PRBool gDisableXULCache = PR_FALSE
static const char kDisableXULCachePref [] = "nglayout.debug.disable_xul_cache"
REFNSIID aIID
static PRBool gChecksumXULFastLoadFile = PR_TRUE
static const char kDisableXULFastLoadPref [] = "nglayout.debug.disable_xul_fastload"
static const char kChecksumXULFastLoadFilePref [] = "nglayout.debug.checksum_xul_fastload_file"

Function Documentation

DisableXULCacheChangedCallback ( const char *  aPref,
void aClosure 
)

Definition at line 147 of file nsXULPrototypeCache.cpp.

{
    gDisableXULCache =
        nsContentUtils::GetBoolPref(kDisableXULCachePref, gDisableXULCache);

    // Flush the cache, regardless
    static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID);
    nsCOMPtr<nsIXULPrototypeCache> cache(do_GetService(kXULPrototypeCacheCID));

    if (cache)
        cache->Flush();

    return 0;
}

Here is the call graph for this function:

FastLoadPrefChangedCallback ( const char *  aPref,
void aClosure 
)

Definition at line 686 of file nsXULPrototypeCache.cpp.

{
    PRBool wasEnabled = !gDisableXULFastLoad;
    gDisableXULFastLoad =
        nsContentUtils::GetBoolPref(kDisableXULFastLoadPref,
                                    gDisableXULFastLoad);

    if (wasEnabled && gDisableXULFastLoad) {
        static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID);
        nsCOMPtr<nsIXULPrototypeCache> cache =
            do_GetService(kXULPrototypeCacheCID);

        if (cache)
            cache->AbortFastLoads();
    }

    gChecksumXULFastLoadFile =
        nsContentUtils::GetBoolPref(kChecksumXULFastLoadFilePref,
                                    gChecksumXULFastLoadFile);

    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 189 of file nsXULPrototypeCache.cpp.

Definition at line 503 of file nsXULPrototypeCache.cpp.

Definition at line 141 of file nsXULPrototypeCache.cpp.

const char kChecksumXULFastLoadFilePref[] = "nglayout.debug.checksum_xul_fastload_file" [static]

Definition at line 584 of file nsXULPrototypeCache.cpp.

const char kDisableXULCachePref[] = "nglayout.debug.disable_xul_cache" [static]

Definition at line 142 of file nsXULPrototypeCache.cpp.

const char kDisableXULFastLoadPref[] = "nglayout.debug.disable_xul_fastload" [static]

Definition at line 583 of file nsXULPrototypeCache.cpp.