XPCJSThrower::ThrowBadResultException(uintN errNum, JSContext* cx, nsXPCWrappedNativeClass* clazz, const XPCNativeMemberDescriptor* desc, nsresult result) { char* sz; const char* format; JSString* str = NULL;  format = mFormats[errNum].format;  sz = JS_smprintf("%s 0x%x", format, result);  if(sz && mVerbose) Verbosify(cx, clazz, desc, &sz, PR_TRUE);  if(sz) { str = JS_NewStringCopyZ(cx, sz); JS_smprintf_free(sz); }  if(str) JS_SetPendingException(cx, STRING_TO_JSVAL(str)); else JS_ReportOutOfMemory(cx); }
void ThrowBadResultException(JSContext* cx, const XPCNativeMemberDescriptor* desc, nsresult result) {nsXPConnect::GetJSThrower()-> ThrowBadResultException(NS_ERROR_XPC_NATIVE_RETURNED_FAILURE, cx, this, desc, result);}
XPCJSThrower::ThrowBadResultException(uintN errNum,                                      JSContext* cx,                                      nsXPCWrappedNativeClass* clazz,                                      const XPCNativeMemberDescriptor* desc,                                      nsresult result){    char* sz;    const char* format;    JSString* str = NULL;    format = mFormats[errNum].format;    sz = JS_smprintf("%s 0x%x", format, result);    if(sz && mVerbose)        Verbosify(cx, clazz, desc, &sz, PR_TRUE);    if(sz)    {        str = JS_NewStringCopyZ(cx, sz);        JS_smprintf_free(sz);    }    if(str)        JS_SetPendingException(cx, STRING_TO_JSVAL(str));    else        JS_ReportOutOfMemory(cx);}