if (!nativeThis) return JS_FALSE;
InstallStartInstall(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsInstall *nativeThis =    (nsInstall*)JS_GetInstancePrivate(cx, obj, &InstallClass, argv);  if (!nativeThis)    return JS_FALSE;  PRInt32 nativeRet;  nsAutoString b0;  nsAutoString b1;  nsAutoString b2;  *rval = INT_TO_JSVAL(nsInstall::UNEXPECTED_ERROR);  // If there's no private data, this must be the prototype, so ignore  if (nsnull == nativeThis) {    return JS_TRUE;  }  if(argc == 3 || argc == 4)  {    //  public int StartInstall (String userPackageName,    //                           String package,    //                           String version); --OR-- VersionInfo version    //                           flags?    ConvertJSValToStr(b0, cx, argv[0]);    ConvertJSValToStr(b1, cx, argv[1]);    ConvertJSvalToVersionString(b2, cx, argv[2]);    jsrefcount saveDepth;    saveDepth = JS_SuspendRequest(cx);//Need to suspend use of thread or deadlock occurs    nsresult rv = nativeThis->StartInstall(b0, b1, b2, &nativeRet);    JS_ResumeRequest(cx, saveDepth); //Resume the suspened thread    if (NS_FAILED(rv))    {        return JS_FALSE;    }    *rval = INT_TO_JSVAL(nativeRet);  }  else  {    JS_ReportError(cx, "Function StartInstall requires 3 parameters");    return JS_FALSE;  }  return JS_TRUE;}