nsCvrtJSValToStr(b0, cx, argv[0]);
ConvertJSValToStr(b0, cx, argv[0]);
InstallTriggerGlobalCompareVersion(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 b1str;  PRInt32      b1int;  PRInt32      b2int;  PRInt32      b3int;  PRInt32      b4int;  *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 CompareVersion(String registryName,    //                            int    major,    //                            int    minor,    //                            int    release,    //                            int    build);    nsCvrtJSValToStr(b0, cx, argv[0]);    if(!JS_ValueToInt32(cx, argv[1], (int32 *)&b1int))    {      JS_ReportError(cx, "2th parameter must be a number");      return JS_FALSE;    }    if(!JS_ValueToInt32(cx, argv[2], (int32 *)&b2int))    {      JS_ReportError(cx, "3th parameter must be a number");      return JS_FALSE;    }    if(!JS_ValueToInt32(cx, argv[3], (int32 *)&b3int))    {      JS_ReportError(cx, "4th parameter must be a number");      return JS_FALSE;    }    if(!JS_ValueToInt32(cx, argv[4], (int32 *)&b4int))    {      JS_ReportError(cx, "5th parameter must be a number");      return JS_FALSE;    }    if(NS_OK != nativeThis->CompareVersion(b0, b1int, b2int, b3int, b4int, &nativeRet))    {      return JS_FALSE;    }    *rval = INT_TO_JSVAL(nativeRet);  }  else if(argc >= 2)  {    //  public int CompareVersion(String registryName,    //                            String version); --OR-- VersionInfo version    nsCvrtJSValToStr(b0, cx, argv[0]);    if(JSVAL_IS_OBJECT(argv[1]))    {        JSObject* jsobj = JSVAL_TO_OBJECT(argv[1]);        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->CompareVersion(b0, version, &nativeRet))          {                return JS_FALSE;          }        }    }    else    {        nsCvrtJSValToStr(b1str, cx, argv[1]);        if(NS_OK != nativeThis->CompareVersion(b0, b1str, &nativeRet))        {          return JS_FALSE;        }    }    *rval = INT_TO_JSVAL(nativeRet);  }  else  {    JS_ReportError(cx, "Function CompareVersion requires 5 parameters");    return JS_FALSE;  }  return JS_TRUE;}