Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
xpcwrappedjsclass.cpp File Reference
#include "xpcprivate.h"

Go to the source code of this file.


class  WrappedJSIdentity


#define HANDLE_OUT_CONVERSION_FAILURE   {outConversionFailedIndex = i; break;}


JSBool xpc_IsReportableErrorCode (nsresult code)
static JSBool GetNamedPropertyAsVariantRaw (XPCCallContext &ccx, JSObject *aJSObj, jsid aName, nsIVariant **aResult, nsresult *pErr)
void JS_DLL_CALLBACK xpcWrappedJSErrorReporter (JSContext *cx, const char *message, JSErrorReport *report)


static uint32 zero_methods_descriptor

Define Documentation

#define HANDLE_OUT_CONVERSION_FAILURE   {outConversionFailedIndex = i; break;}
{ 0x5c5c3bb0, 0xa9ba, 0x11d2,                       \
  { 0xba, 0x64, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } }

Definition at line 468 of file xpcwrappedjsclass.cpp.

Function Documentation

static JSBool GetNamedPropertyAsVariantRaw ( XPCCallContext ccx,
JSObject aJSObj,
jsid  aName,
nsIVariant **  aResult,
nsresult pErr 
) [static]

Definition at line 290 of file xpcwrappedjsclass.cpp.

    nsXPTType type = nsXPTType((uint8)(TD_INTERFACE_TYPE | XPT_TDP_POINTER));
    jsval val;

    return OBJ_GET_PROPERTY(ccx, aJSObj, aName, &val) &&
           XPCConvert::JSData2Native(ccx, aResult, val, type, JS_FALSE, 
                                     &NS_GET_IID(nsIVariant), pErr);

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 113 of file xpcwrappedjsclass.cpp.

        return JS_FALSE;

        // Error codes that we don't want to report as errors...
        // These generally indicate bad interface design AFAIC. 
            return JS_FALSE;
    return JS_TRUE;

Here is the caller graph for this function:

void JS_DLL_CALLBACK xpcWrappedJSErrorReporter ( JSContext cx,
const char *  message,
JSErrorReport report 

Definition at line 679 of file xpcwrappedjsclass.cpp.

        // If it is an exception report, then we can just deal with the
        // exception later (if not caught in the JS code).
            // XXX We have a problem with error reports from uncaught exceptions.
            // The issue is...
            // We can't assume that the exception will *stay* uncaught. So, if
            // we build an nsIXPCException here and the underlying exception
            // really is caught before our script is done running then we blow
            // it by returning failure to our caller when the script didn't
            // really fail. However, This report contains error location info
            // that is no longer available after the script is done. So, if the
            // exception really is not caught (and is a non-engine exception)
            // then we've lost the oportunity to capture the script location
            // info that we *could* have captured here.
            // This is expecially an issue with nested evaluations.
            // Perhaps we could capture an expception here and store it as
            // 'provisional' and then later if there is a pending exception
            // when the script is done then we could maybe compare that in some
            // way with the 'provisional' one in which we captured location info.
            // We would not want to assume that the one discovered here is the
            // same one that is later detected. This could cause us to lie.
            // The thing is. we do not currently store the right stuff to compare
            // these two nsIXPCExceptions (triggered by the same exception jsval
            // in the engine). Maybe we should store the jsval and compare that?
            // Maybe without even rooting it since we will not dereference it.
            // This is inexact, but maybe the right thing to do?
            // if(report->errorNumber == JSMSG_UNCAUGHT_EXCEPTION)) ...


            // XXX printf the warning (#ifdef DEBUG only!).
            // XXX send the warning to the console service.

    XPCCallContext ccx(NATIVE_CALLER, cx);

    nsCOMPtr<nsIException> e;
    XPCConvert::JSErrorToXPCException(ccx, message, nsnull, nsnull, report,

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Definition at line 49 of file xpcwrappedjsclass.cpp.