Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
XPCNativeScriptableInfo Class Reference

#include <xpcprivate.h>

Collaboration diagram for XPCNativeScriptableInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsIXPCScriptableGetCallback () const
const XPCNativeScriptableFlagsGetFlags () const
JSClassGetJSClass ()
XPCNativeScriptableSharedGetScriptableShared ()
void SetCallback (nsIXPCScriptable *s)
void SetScriptableShared (XPCNativeScriptableShared *shared)
void Mark ()
 ~XPCNativeScriptableInfo ()

Static Public Member Functions

static XPCNativeScriptableInfoConstruct (XPCCallContext &ccx, JSBool isGlobal, const XPCNativeScriptableCreateInfo *sci)

Protected Member Functions

 XPCNativeScriptableInfo (nsIXPCScriptable *scriptable=nsnull, XPCNativeScriptableShared *shared=nsnull)

Private Member Functions

 XPCNativeScriptableInfo (const XPCNativeScriptableInfo &r)
XPCNativeScriptableInfooperator= (const XPCNativeScriptableInfo &r)

Private Attributes

nsCOMPtr< nsIXPCScriptablemCallback
XPCNativeScriptableSharedmShared

Detailed Description

Definition at line 1542 of file xpcprivate.h.


Constructor & Destructor Documentation

Definition at line 1570 of file xpcprivate.h.

Here is the caller graph for this function:

Definition at line 1575 of file xpcprivate.h.


Member Function Documentation

Definition at line 1293 of file xpcwrappednativejsops.cpp.

{
    NS_ASSERTION(sci, "bad param");
    NS_ASSERTION(sci->GetCallback(), "bad param");

    XPCNativeScriptableInfo* newObj =
        new XPCNativeScriptableInfo(sci->GetCallback());
    if(!newObj)
        return nsnull;

    char* name = nsnull;
    if(NS_FAILED(sci->GetCallback()->GetClassName(&name)) || !name)
    {
        delete newObj;
        return nsnull;
    }

    JSBool success;

    XPCJSRuntime* rt = ccx.GetRuntime();
    XPCNativeScriptableSharedMap* map = rt->GetNativeScriptableSharedMap();
    {   // scoped lock
        XPCAutoLock lock(rt->GetMapLock());
        success = map->GetNewOrUsed(sci->GetFlags(), name, isGlobal, newObj);
    }

    if(!success)
    {
        delete newObj;
        return nsnull;
    }

    return newObj;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1550 of file xpcprivate.h.

{return mCallback;}

Here is the caller graph for this function:

Definition at line 1553 of file xpcprivate.h.

{return mShared->GetFlags();}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1556 of file xpcprivate.h.

{return mShared->GetJSClass();}

Here is the caller graph for this function:

Definition at line 1559 of file xpcprivate.h.

{return mShared;}

Definition at line 1567 of file xpcprivate.h.

{if(mShared) mShared->Mark();}

Here is the caller graph for this function:

XPCNativeScriptableInfo& XPCNativeScriptableInfo::operator= ( const XPCNativeScriptableInfo r) [private]

Definition at line 1562 of file xpcprivate.h.

{mCallback = s;}

Definition at line 1565 of file xpcprivate.h.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 1583 of file xpcprivate.h.

Definition at line 1584 of file xpcprivate.h.


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