Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions | Variables
nsXPConnect.cpp File Reference
#include "xpcprivate.h"
#include "XPCNativeWrapper.h"

Go to the source code of this file.

Classes

class  SaveFrame

Typedefs

typedef PRBool(* InfoTester )(nsIInterfaceInfoManager *manager, const void *data, nsIInterfaceInfo **info)

Functions

static PRBool IIDTester (nsIInterfaceInfoManager *manager, const void *data, nsIInterfaceInfo **info)
static PRBool NameTester (nsIInterfaceInfoManager *manager, const void *data, nsIInterfaceInfo **info)
static nsresult FindInfo (InfoTester tester, const void *data, nsIInterfaceInfoSuperManager *iism, nsIInterfaceInfo **info)
nsresult UnexpectedFailure (nsresult rv)
 TempGlobalResolve (JSContext *aJSContext, JSObject *obj, jsval id)
 MoveableWrapperFinder (JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number, void *arg)

Variables

const char XPC_CONTEXT_STACK_CONTRACTID [] = "@mozilla.org/js/xpc/ContextStack;1"
const char XPC_RUNTIME_CONTRACTID [] = "@mozilla.org/js/xpc/RuntimeService;1"
const char XPC_EXCEPTION_CONTRACTID [] = "@mozilla.org/js/xpc/Exception;1"
const char XPC_CONSOLE_CONTRACTID [] = "@mozilla.org/consoleservice;1"
const char XPC_SCRIPT_ERROR_CONTRACTID [] = "@mozilla.org/scripterror;1"
const char XPC_ID_CONTRACTID [] = "@mozilla.org/js/xpc/ID;1"
const char XPC_XPCONNECT_CONTRACTID [] = "@mozilla.org/js/xpc/XPConnect;1"
static JSClass xpcTempGlobalClass

Typedef Documentation

Definition at line 354 of file nsXPConnect.cpp.


Function Documentation

static nsresult FindInfo ( InfoTester  tester,
const void data,
nsIInterfaceInfoSuperManager iism,
nsIInterfaceInfo **  info 
) [static]

Definition at line 371 of file nsXPConnect.cpp.

{
    if(tester(iism, data, info))
        return NS_OK;
    
    // If not found, then let's ask additional managers.

    PRBool yes;
    nsCOMPtr<nsISimpleEnumerator> list;

    if(NS_SUCCEEDED(iism->HasAdditionalManagers(&yes)) && yes &&
       NS_SUCCEEDED(iism->EnumerateAdditionalManagers(getter_AddRefs(list))) &&
       list)
    {
        PRBool more;
        nsCOMPtr<nsIInterfaceInfoManager> current;

        while(NS_SUCCEEDED(list->HasMoreElements(&more)) && more &&
              NS_SUCCEEDED(list->GetNext(getter_AddRefs(current))) && current)
        {
            if(tester(current, data, info))
                return NS_OK;
        }
    }
    
    return NS_ERROR_NO_INTERFACE;
}    

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool IIDTester ( nsIInterfaceInfoManager manager,
const void data,
nsIInterfaceInfo **  info 
) [static]

Definition at line 357 of file nsXPConnect.cpp.

{
    return NS_SUCCEEDED(manager->GetInfoForIID((const nsIID *) data, info)) &&
           *info;
}

Here is the caller graph for this function:

MoveableWrapperFinder ( JSDHashTable table,
JSDHashEntryHdr hdr,
uint32  number,
void arg 
)

Definition at line 773 of file nsXPConnect.cpp.

{
    // Every element counts.
    nsVoidArray *va = NS_STATIC_CAST(nsVoidArray *,arg);
    va->AppendElement(((Native2WrappedNativeMap::Entry*)hdr)->value);
    return JS_DHASH_NEXT;
}

Here is the call graph for this function:

static PRBool NameTester ( nsIInterfaceInfoManager manager,
const void data,
nsIInterfaceInfo **  info 
) [static]

Definition at line 364 of file nsXPConnect.cpp.

{
    return NS_SUCCEEDED(manager->GetInfoForName((const char *) data, info)) &&
           *info;
}

Here is the caller graph for this function:

TempGlobalResolve ( JSContext aJSContext,
JSObject obj,
jsval  id 
)

Definition at line 481 of file nsXPConnect.cpp.

{
    JSBool resolved;
    return JS_ResolveStandardClass(aJSContext, obj, id, &resolved);
}

Here is the call graph for this function:

Definition at line 417 of file nsXPConnect.cpp.

{
    NS_ERROR("This is not supposed to fail!");
    return rv;
}

Variable Documentation

const char XPC_CONSOLE_CONTRACTID[] = "@mozilla.org/consoleservice;1"

Definition at line 62 of file nsXPConnect.cpp.

const char XPC_CONTEXT_STACK_CONTRACTID[] = "@mozilla.org/js/xpc/ContextStack;1"

Definition at line 59 of file nsXPConnect.cpp.

const char XPC_EXCEPTION_CONTRACTID[] = "@mozilla.org/js/xpc/Exception;1"

Definition at line 61 of file nsXPConnect.cpp.

const char XPC_ID_CONTRACTID[] = "@mozilla.org/js/xpc/ID;1"

Definition at line 64 of file nsXPConnect.cpp.

const char XPC_RUNTIME_CONTRACTID[] = "@mozilla.org/js/xpc/RuntimeService;1"

Definition at line 60 of file nsXPConnect.cpp.

const char XPC_SCRIPT_ERROR_CONTRACTID[] = "@mozilla.org/scripterror;1"

Definition at line 63 of file nsXPConnect.cpp.

const char XPC_XPCONNECT_CONTRACTID[] = "@mozilla.org/js/xpc/XPConnect;1"

Definition at line 65 of file nsXPConnect.cpp.