if (!nativeThis) return JS_FALSE;
InstallGetComponentFolder(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsInstall *nativeThis =    (nsInstall*)JS_GetInstancePrivate(cx, obj, &InstallClass, argv);  if (!nativeThis)    return JS_FALSE;  nsInstallFolder* folder;  nsAutoString b0;  nsAutoString b1;  *rval = JSVAL_NULL;  // If there's no private data, this must be the prototype, so ignore  if (nsnull == nativeThis) {    return JS_TRUE;  }  if(argc >= 2)  {    //  public int GetComponentFolder ( String registryName,    //                                  String subDirectory);    ConvertJSValToStr(b0, cx, argv[0]);    ConvertJSValToStr(b1, cx, argv[1]);    if(NS_OK != nativeThis->GetComponentFolder(b0, b1, &folder))    {      // error!      return JS_FALSE;    }  }  else if(argc >= 1)  {    //  public int GetComponentFolder ( String registryName);    ConvertJSValToStr(b0, cx, argv[0]);    if(NS_OK != nativeThis->GetComponentFolder(b0, &folder))    {      // error!      return JS_FALSE;    }  }  else  {    JS_ReportError(cx, "Function GetComponentFolder requires 2 parameters");    return JS_FALSE;  }  // if we couldn't find one return null rval from here  if(nsnull == folder)  {    return JS_TRUE;  }  /* Now create the new JSObject */  JSObject* fileSpecObject;  fileSpecObject = JS_NewObject(cx, &FileSpecObjectClass, gFileSpecProto, NULL);  if (fileSpecObject == NULL)    return JS_FALSE;  JS_SetPrivate(cx, fileSpecObject, folder);  if (fileSpecObject == NULL)    return JS_FALSE;  *rval = OBJECT_TO_JSVAL(fileSpecObject);  return JS_TRUE;}