NS_AUTOLOCK(mLock);
InMemoryDataSource::HasAssertion(nsIRDFResource* source,                                 nsIRDFResource* property,                                 nsIRDFNode* target,                                 PRBool tv,                                 PRBool* hasAssertion){    if (! source)        return NS_ERROR_NULL_POINTER;    if (! property)        return NS_ERROR_NULL_POINTER;    if (! target)        return NS_ERROR_NULL_POINTER;    NS_AUTOLOCK(mLock);    Assertion *as = GetForwardArcs(source);    if (as && as->mHashEntry) {        PLDHashEntryHdr* hdr = PL_DHashTableOperate(as->u.hash.mPropertyHash, property, PL_DHASH_LOOKUP);        Assertion* val = PL_DHASH_ENTRY_IS_BUSY(hdr)            ? NS_REINTERPRET_CAST(Entry*, hdr)->mAssertions            : nsnull;        while (val) {            if ((val->u.as.mTarget == target) && (tv == (val->u.as.mTruthValue))) {                *hasAssertion = PR_TRUE;                return NS_OK;            }            val = val->mNext;        }    }    else    for (; as != nsnull; as = as->mNext) {        // check target first as its most unique        if (target != as->u.as.mTarget)            continue;        if (property != as->u.as.mProperty)            continue;        if (tv != (as->u.as.mTruthValue))            continue;        // found it!        *hasAssertion = PR_TRUE;        return NS_OK;    }    // If we get here, we couldn't find the assertion    *hasAssertion = PR_FALSE;    return NS_OK;}