doomed->mNext = doomed->mInvNext = nsnull;
doomed->mNext = doomed->u.as.mInvNext = nsnull;
InMemoryDataSource::Sweep(){    SweepInfo info = { nsnull, &mReverseArcs };    {        // Remove all the assertions while holding the lock, but don't notify anyone.        NS_AUTOLOCK(mLock);        PL_DHashTableEnumerate(&mForwardArcs, SweepForwardArcsEntries, &info);    }    // Now we've left the autolock. Do the notification.    Assertion* as = info.mUnassertList;    while (as) {#ifdef PR_LOGGING        LogOperation("SWEEP", as->mSource, as->mProperty, as->mTarget, as->mTruthValue);#endif                if (mObservers) {            nsresult rv;            PRUint32 count;            rv = mObservers->Count(&count);            if (NS_SUCCEEDED(rv)) {                for (PRInt32 i = PRInt32(count) - 1; i >= 0; --i) {                    nsIRDFObserver* obs = (nsIRDFObserver*) mObservers->ElementAt(i);                    obs->OnUnassert(this, as->mSource, as->mProperty, as->mTarget);                    // XXX ignore return value?                }            }        }        Assertion* doomed = as;        as = as->mNext;        // Unlink, and release the datasource's reference        doomed->mNext = doomed->mInvNext = nsnull;        doomed->Release(mAllocator);    }    return NS_OK;}