clazz->LookupMemberByID(clazz->GetXPCContext()->GetToStringStrID());
clazz->LookupMemberByID(clazz->GetXPCContext()-> GetStringID(XPCContext::IDX_TO_STRING));
WrappedNative_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp){    nsXPCWrappedNative* wrapper = (nsXPCWrappedNative*) JS_GetPrivate(cx, obj);    if (!wrapper) {        if (type == JSTYPE_OBJECT) {            *vp = OBJECT_TO_JSVAL(obj);            return JS_TRUE;        }        JS_ReportError(cx, "illegal operation on WrappedNative prototype object");        return JS_FALSE;    }    switch (type) {    case JSTYPE_OBJECT:        *vp = OBJECT_TO_JSVAL(obj);        return JS_TRUE;    case JSTYPE_FUNCTION:        JS_ReportError(cx, "can't convert WrappedNative to function");        return JS_FALSE;    case JSTYPE_VOID:    case JSTYPE_STRING:    {        nsXPCWrappedNativeClass* clazz = wrapper->GetClass();        NS_ASSERTION(clazz,"wrapper without class");        const XPCNativeMemberDescriptor* desc =             clazz->LookupMemberByID(clazz->GetXPCContext()->GetToStringStrID());        if(desc && desc->IsMethod())        {            if(!clazz->CallWrappedMethod(cx, wrapper, desc,                                          JS_FALSE, 0, NULL, vp))                return JS_FALSE;            if(JSVAL_IS_PRIMITIVE(*vp))                return JS_TRUE;        }        // else...        char* sz = JS_smprintf("[xpconnect wrapped %s]",                                wrapper->GetClass()->GetInterfaceName());        if(sz)        {            *vp = STRING_TO_JSVAL(JS_NewString(cx, sz, strlen(sz)));            return JS_TRUE;        }        JS_ReportOutOfMemory(cx);        return JS_FALSE;    }    case JSTYPE_NUMBER:        *vp = JSVAL_ONE;        return JS_TRUE;    case JSTYPE_BOOLEAN:        *vp = JSVAL_TRUE;        return JS_TRUE;    default:        NS_ASSERTION(0,"bad type in conversion");        return JS_FALSE;    }}