Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions
nsXPCToolsProfiler Class Reference

#include <xpctools_private.h>

Inheritance diagram for nsXPCToolsProfiler:
Inheritance graph
[legend]
Collaboration diagram for nsXPCToolsProfiler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIXPCTOOLSPROFILER 
nsXPCToolsProfiler ()
virtual ~nsXPCToolsProfiler ()
void start ()
void stop ()
void clear ()
void writeResults (in nsILocalFile aFile)

Public Attributes

PRLockmLock
JSRuntimemRuntime
nsHashtable * mFileTable
nsHashtable * mScriptTable

Private Member Functions

JSBool InitializeRuntime ()
JSBool VerifyRuntime ()

Detailed Description

Definition at line 162 of file xpctools_private.h.


Constructor & Destructor Documentation

Definition at line 142 of file nsXPCToolsProfiler.cpp.

    :   mLock(PR_NewLock()),
        mRuntime(nsnull),
        mFileTable(new nsHashtable(128, PR_FALSE)),
        mScriptTable(new nsHashtable(256, PR_FALSE))
{
    InitializeRuntime();
}

Definition at line 167 of file nsXPCToolsProfiler.cpp.

{
    Stop();
    if(mLock)
        PR_DestroyLock(mLock);
    if(mFileTable)
    {
        mFileTable->Reset(xpctools_ProfilerFileDeleter, this);
        delete mFileTable;
    }
    if(mScriptTable)
    {
        // elements not owned - don't purge them
        delete mScriptTable;
    }
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 398 of file nsXPCToolsProfiler.cpp.

{
    NS_ASSERTION(!mRuntime, "can't init runtime twice");
    JSRuntime* rt;
    nsCOMPtr<nsIJSRuntimeService> rts = do_GetService("@mozilla.org/js/xpc/RuntimeService;1");
    if(rts && NS_SUCCEEDED(rts->GetRuntime(&rt)) && rt)
        mRuntime = rt;
    return mRuntime != nsnull;
}

Here is the call graph for this function:

Definition at line 390 of file nsXPCToolsProfiler.cpp.

{
    JSRuntime* rt;
    nsCOMPtr<nsIJSRuntimeService> rts = do_GetService("@mozilla.org/js/xpc/RuntimeService;1");
    return rts && NS_SUCCEEDED(rts->GetRuntime(&rt)) && rt && rt == mRuntime;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 182 of file xpctools_private.h.

Definition at line 180 of file xpctools_private.h.

Definition at line 181 of file xpctools_private.h.

Definition at line 183 of file xpctools_private.h.


The documentation for this class was generated from the following files: