AUTO_PUSH_JSCONTEXT(cx);
WrappedNative_CallMethod(JSContext *cx, JSObject *obj,                         uintN argc, jsval *argv, jsval *vp){    JSFunction *fun;    jsid id;    jsval idval;    nsXPCWrappedNative* wrapper;    wrapper = (nsXPCWrappedNative*) JS_GetPrivate(cx, obj);    if(!wrapper)        return JS_FALSE;    nsXPCWrappedNativeClass* clazz = wrapper->GetClass();    NS_ASSERTION(clazz,"wrapper without class");    NS_ASSERTION(JS_TypeOfValue(cx, argv[-2]) == JSTYPE_FUNCTION, "bad function");    fun = (JSFunction*) JS_GetPrivate(cx, JSVAL_TO_OBJECT(argv[-2]));    idval = STRING_TO_JSVAL(JS_InternString(cx, JS_GetFunctionName(fun)));    JS_ValueToId(cx, idval, &id);    const XPCNativeMemberDescriptor* desc = clazz->LookupMemberByID(id);    if(!desc || !desc->IsMethod())        return JS_FALSE;    return clazz->CallWrappedMethod(cx, wrapper, desc,                                     nsXPCWrappedNativeClass::CALL_METHOD,                                     argc, argv, vp);}