*rval = OBJECT_TO_JSVAL(nsIRDFResource::GetJSObject(cx, retval)); NS_RELEASE(retval);
*rval = retval ? OBJECT_TO_JSVAL(nsIRDFResource::GetJSObject(cx, retval)) : 0; NS_IF_RELEASE(retval);
nsIRDFDataSource_GetSource(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsIRDFDataSource *priv = (nsIRDFDataSource *)JS_GetPrivate(cx, obj);  if (!priv)    return JS_TRUE;  nsIRDFResource *aProperty;  nsIRDFNode *aTarget;  PRBool aTruthValue;  if (!JS_ConvertArguments(cx, argc, argv, "oob", &aProperty, &aTarget, &aTruthValue))    return JS_FALSE;  nsIRDFResource * retval;  nsresult rv = priv->GetSource(aProperty, aTarget, aTruthValue, &retval);  if (NS_FAILED(rv)) {    JS_ReportError(cx, XXXnsresult2string(rv));    return JS_FALSE;  }  *rval = OBJECT_TO_JSVAL(nsIRDFResource::GetJSObject(cx, retval));  NS_RELEASE(retval);  return JS_TRUE;}