nsJSUtils::nsConvertXPCObjectToJSVal(prop, nsIRDFCompositeDataSource::GetIID(), cx, obj, vp);
nsJSUtils::nsConvertXPCObjectToJSVal(prop, NS_GET_IID(nsIRDFCompositeDataSource), cx, obj, vp);
GetXULElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp){  nsIDOMXULElement *a = (nsIDOMXULElement*)nsJSUtils::nsGetNativeThis(cx, obj);  // If there's no private data, this must be the prototype, so ignore  if (nsnull == a) {    return JS_TRUE;  }  if (JSVAL_IS_INT(id)) {    nsresult rv;    NS_WITH_SERVICE(nsIScriptSecurityManager, secMan,                    NS_SCRIPTSECURITYMANAGER_PROGID, &rv);    if (NS_FAILED(rv)) {      return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECMAN_ERR);    }    switch(JSVAL_TO_INT(id)) {      case XULELEMENT_ID:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_XULELEMENT_ID, PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR);        }        nsAutoString prop;        nsresult result = NS_OK;        result = a->GetId(prop);        if (NS_SUCCEEDED(result)) {          nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);        }        else {          return nsJSUtils::nsReportError(cx, obj, result);        }        break;      }      case XULELEMENT_CLASSNAME:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_XULELEMENT_CLASSNAME, PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR);        }        nsAutoString prop;        nsresult result = NS_OK;        result = a->GetClassName(prop);        if (NS_SUCCEEDED(result)) {          nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);        }        else {          return nsJSUtils::nsReportError(cx, obj, result);        }        break;      }      case XULELEMENT_STYLE:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_XULELEMENT_STYLE, PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR);        }        nsIDOMCSSStyleDeclaration* prop;        nsresult result = NS_OK;        result = a->GetStyle(&prop);        if (NS_SUCCEEDED(result)) {          // get the js object          nsJSUtils::nsConvertObjectToJSVal((nsISupports *)prop, cx, obj, vp);        }        else {          return nsJSUtils::nsReportError(cx, obj, result);        }        break;      }      case XULELEMENT_DATABASE:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_XULELEMENT_DATABASE, PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR);        }        nsIRDFCompositeDataSource* prop;        nsresult result = NS_OK;        result = a->GetDatabase(&prop);        if (NS_SUCCEEDED(result)) {          // get the js object; n.b., this will do a release on 'prop'          nsJSUtils::nsConvertXPCObjectToJSVal(prop, nsIRDFCompositeDataSource::GetIID(), cx, obj, vp);        }        else {          return nsJSUtils::nsReportError(cx, obj, result);        }        break;      }      case XULELEMENT_RESOURCE:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_XULELEMENT_RESOURCE, PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR);        }        nsIRDFResource* prop;        nsresult result = NS_OK;        result = a->GetResource(&prop);        if (NS_SUCCEEDED(result)) {          // get the js object; n.b., this will do a release on 'prop'          nsJSUtils::nsConvertXPCObjectToJSVal(prop, nsIRDFResource::GetIID(), cx, obj, vp);        }        else {          return nsJSUtils::nsReportError(cx, obj, result);        }        break;      }      case XULELEMENT_CONTROLLERS:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_XULELEMENT_CONTROLLERS, PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR);        }        nsIControllers* prop;        nsresult result = NS_OK;        result = a->GetControllers(&prop);        if (NS_SUCCEEDED(result)) {          // get the js object; n.b., this will do a release on 'prop'          nsJSUtils::nsConvertXPCObjectToJSVal(prop, nsIControllers::GetIID(), cx, obj, vp);        }        else {          return nsJSUtils::nsReportError(cx, obj, result);        }        break;      }      default:        return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);    }  }  else {    return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);  }  return PR_TRUE;}