PRBool hasArc = PR_FALSE; mDB->HasArcOut(aResource, *property, &hasArc);
PRBool hasArc; rv = mDB->HasArcOut(aResource, *property, &hasArc); if (NS_FAILED(rv)) return rv;
nsXULTemplateBuilder::CheckContainer(nsIRDFResource* aResource, PRBool* aIsContainer, PRBool* aIsEmpty){    // We have to look at all of the arcs extending out of the    // resource: if any of them are that "containment" property, then    // we know we'll have children.    PRBool isContainer = PR_FALSE;    PRBool isEmpty = PR_TRUE; // assume empty    for (nsResourceSet::ConstIterator property = mContainmentProperties.First();         property != mContainmentProperties.Last();         property++) {        PRBool hasArc = PR_FALSE;        mDB->HasArcOut(aResource, *property, &hasArc);        if (hasArc) {            // Well, it's a container...            isContainer = PR_TRUE;            // ...should we check if it's empty?            if (!aIsEmpty || (mFlags & eDontTestEmpty)) {                isEmpty = PR_FALSE;                break;            }            // Yes: call GetTarget() and see if there's anything on            // the other side...            nsCOMPtr<nsIRDFNode> dummy;            mDB->GetTarget(aResource, *property, PR_TRUE, getter_AddRefs(dummy));            if (dummy) {                isEmpty = PR_FALSE;                break;            }            // Even if there isn't a target for *this* containment            // property, we have continue to check the other            // properties: one of them may have a target.        }    }    // If we get here, and we're still not sure if it's a container,    // then see if it's an RDF container    if (! isContainer) {        gRDFContainerUtils->IsContainer(mDB, aResource, &isContainer);        if (isContainer && aIsEmpty && !(mFlags & eDontTestEmpty))            gRDFContainerUtils->IsEmpty(mDB, aResource, &isEmpty);    }    if (aIsContainer)        *aIsContainer = isContainer;    if (aIsEmpty)        *aIsEmpty = isEmpty;    return NS_OK;}