if(version.IsEmpty()) *rval = JSVAL_NULL; else ConvertStrToJSVal(version, cx, rval);
InstallTriggerGlobalGetVersion(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsIDOMInstallTriggerGlobal *nativeThis = (nsIDOMInstallTriggerGlobal*)JS_GetPrivate(cx, obj);  nsAutoString regname;  nsAutoString version;  *rval = JSVAL_NULL;  if (nsnull == nativeThis  &&  (JS_FALSE == CreateNativeObject(cx, obj, &nativeThis)) )    return JS_FALSE;  // get the registry name argument  ConvertJSValToStr(regname, cx, argv[0]);  if(NS_OK != nativeThis->GetVersion(regname, version))  {        return JS_FALSE;  }  if(version.IsEmpty())      *rval = JSVAL_NULL;    else      ConvertStrToJSVal(version, cx, rval);  return JS_TRUE;}