if (mReadCount) { NS_WARNING("Writing to InMemoryDataSource during read\n"); return NS_RDF_ASSERTION_REJECTED; }
InMemoryDataSource::Assert(nsIRDFResource* aSource,                           nsIRDFResource* aProperty,                            nsIRDFNode* aTarget,                           PRBool aTruthValue) {    NS_PRECONDITION(aSource != nsnull, "null ptr");    if (! aSource)        return NS_ERROR_NULL_POINTER;    NS_PRECONDITION(aProperty != nsnull, "null ptr");    if (! aProperty)        return NS_ERROR_NULL_POINTER;    NS_PRECONDITION(aTarget != nsnull, "null ptr");    if (! aTarget)        return NS_ERROR_NULL_POINTER;    nsresult rv;    rv = LockedAssert(aSource, aProperty, aTarget, aTruthValue);    if (NS_FAILED(rv)) return rv;    // notify observers    for (PRInt32 i = (PRInt32)mNumObservers - 1; mPropagateChanges && i >= 0; --i) {        nsIRDFObserver* obs = mObservers[i];        // XXX this should never happen, but it does, and we can't figure out why.        NS_ASSERTION(obs, "observer array corrupted!");        if (! obs)          continue;        obs->OnAssert(this, aSource, aProperty, aTarget);        // XXX ignore return value?    }    return NS_RDF_ASSERTION_ACCEPTED;}