nsCvrtJSValToStr(b3str, cx, argv[3]);
ConvertJSValToStr(b3str, cx, argv[3]);
InstallTriggerGlobalConditionalSoftwareUpdate(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsIDOMInstallTriggerGlobal *nativeThis = (nsIDOMInstallTriggerGlobal*)JS_GetPrivate(cx, obj);  JSBool rBool = JS_FALSE;  PRInt32 nativeRet;  nsAutoString b0;  nsAutoString b1;  nsAutoString b2str;  PRInt32      b2int;  nsAutoString b3str;  PRInt32      b3int;  PRInt32      b4;  *rval = JSVAL_NULL;  // If there's no private data, this must be the prototype, so ignore  if (nsnull == nativeThis) {    return JS_TRUE;  }  if(argc >= 5)  {    //  public int ConditionalSoftwareUpdate(String url,    //                                       String registryName,    //                                       int    diffLevel,    //                                       String version, --OR-- VersionInfo version    //                                       int    mode);    nsCvrtJSValToStr(b0, cx, argv[0]);    nsCvrtJSValToStr(b1, cx, argv[1]);    if(!JS_ValueToInt32(cx, argv[2], (int32 *)&b2int))    {      JS_ReportError(cx, "3rd parameter must be a number");      return JS_FALSE;    }    if(!JS_ValueToInt32(cx, argv[4], (int32 *)&b4))    {      JS_ReportError(cx, "5th parameter must be a number");      return JS_FALSE;    }    if(JSVAL_IS_OBJECT(argv[3]))    {        JSObject* jsobj = JSVAL_TO_OBJECT(argv[3]);        JSClass* jsclass = JS_GetClass(cx, jsobj);        if((nsnull != jsclass) && (jsclass->flags & JSCLASS_HAS_PRIVATE))         {          nsIDOMInstallVersion* version = (nsIDOMInstallVersion*)JS_GetPrivate(cx, jsobj);          if(NS_OK != nativeThis->ConditionalSoftwareUpdate(b0, b1, b2int, version, b4, &nativeRet))          {                return JS_FALSE;          }        }    }    else    {        nsCvrtJSValToStr(b3str, cx, argv[3]);        if(NS_OK != nativeThis->ConditionalSoftwareUpdate(b0, b1, b2int, b3str, b4, &nativeRet))        {          return JS_FALSE;        }    }    *rval = INT_TO_JSVAL(nativeRet);  }  else if(argc >= 4)  {    //  public int ConditionalSoftwareUpdate(String url,    //                                       String registryName,    //                                       String version,  --OR-- VersionInfo version    //                                       int    mode);    nsCvrtJSValToStr(b0, cx, argv[0]);    nsCvrtJSValToStr(b1, cx, argv[1]);    if(!JS_ValueToInt32(cx, argv[3], (int32 *)&b3int))    {      JS_ReportError(cx, "4th parameter must be a number");      return JS_FALSE;    }    if(JSVAL_IS_OBJECT(argv[2]))    {        JSObject* jsobj = JSVAL_TO_OBJECT(argv[2]);        JSClass* jsclass = JS_GetClass(cx, jsobj);        if((nsnull != jsclass) && (jsclass->flags & JSCLASS_HAS_PRIVATE))         {          nsIDOMInstallVersion* version = (nsIDOMInstallVersion*)JS_GetPrivate(cx, jsobj);          if(NS_OK != nativeThis->ConditionalSoftwareUpdate(b0, b1, version, b3int, &nativeRet))          {                return JS_FALSE;          }        }    }    else    {        nsCvrtJSValToStr(b2str, cx, argv[2]);        if(NS_OK != nativeThis->ConditionalSoftwareUpdate(b0, b1, b2str, b3int, &nativeRet))        {          return JS_FALSE;        }    }            *rval = INT_TO_JSVAL(nativeRet);  }  else if(argc >= 3)  {    //  public int ConditionalSoftwareUpdate(String url,    //                                       String registryName,    //                                       String version);  --OR-- VersionInfo version    nsCvrtJSValToStr(b0, cx, argv[0]);    nsCvrtJSValToStr(b1, cx, argv[1]);    if(JSVAL_IS_OBJECT(argv[2]))    {        JSObject* jsobj = JSVAL_TO_OBJECT(argv[2]);        JSClass* jsclass = JS_GetClass(cx, jsobj);        if((nsnull != jsclass) && (jsclass->flags & JSCLASS_HAS_PRIVATE))         {          nsIDOMInstallVersion* version = (nsIDOMInstallVersion*)JS_GetPrivate(cx, jsobj);          if(NS_OK != nativeThis->ConditionalSoftwareUpdate(b0, b1, version, &nativeRet))          {                return JS_FALSE;          }        }    }    else    {        nsCvrtJSValToStr(b2str, cx, argv[2]);        if(NS_OK != nativeThis->ConditionalSoftwareUpdate(b0, b1, b2str, &nativeRet))        {          return JS_FALSE;        }    }            *rval = INT_TO_JSVAL(nativeRet);  }  else  {    JS_ReportError(cx, "Function ConditionalSoftwareUpdate requires 5 parameters");    return JS_FALSE;  }  return JS_TRUE;}