*vp = OBJECT_TO_JSVAL(nsIRDFResource::GetJSObject(cx, Label)); NS_RELEASE(Label);
*vp = Label ? OBJECT_TO_JSVAL(nsIRDFResource::GetJSObject(cx, Label)) : 0; NS_IF_RELEASE(Label);
nsIRDFAssertionCursor_GetProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp){  if (!JSVAL_IS_INT(id))    return JS_TRUE;  nsresult result;  nsIRDFAssertionCursor *priv = (nsIRDFAssertionCursor *)JS_GetPrivate(cx, obj);  if (!priv)    return JS_TRUE;  switch (JSVAL_TO_INT(id)) {   case -1:    nsIRDFResource * Source;    result = priv->GetSource(&Source);    if (NS_FAILED(result))      goto bad;    *vp = OBJECT_TO_JSVAL(nsIRDFResource::GetJSObject(cx, Source));    NS_RELEASE(Source);    break;   case -2:    nsIRDFResource * Label;    result = priv->GetLabel(&Label);    if (NS_FAILED(result))      goto bad;    *vp = OBJECT_TO_JSVAL(nsIRDFResource::GetJSObject(cx, Label));    NS_RELEASE(Label);    break;   case -3:    nsIRDFNode * Target;    result = priv->GetTarget(&Target);    if (NS_FAILED(result))      goto bad;    *vp = OBJECT_TO_JSVAL(nsIRDFNode::GetJSObject(cx, Target));    NS_RELEASE(Target);    break;   case -4:    PRBool TruthValue;    result = priv->GetTruthValue(&TruthValue);    if (NS_FAILED(result))      goto bad;    *vp = BOOLEAN_TO_JSVAL(TruthValue);    break;  }  return JS_TRUE;bad:  JS_ReportError(cx, XXXnsresult2string(result));  return JS_FALSE;}