mStatus = status; if (NS_SUCCEEDED(status)) { rv = mUserListener->OnFound(mUserContext, mLookup->HostName(), mLookup->HostEntry());
if (NS_SUCCEEDED(mStatus)) { rv = mUserListener->OnFound(mUserContext, hostName, hostEnt);
nsDNSRequest::FireStop(nsresult status){    nsresult rv;    NS_ASSERTION(mUserListener, "calling FireStop more than once");    if (mUserListener == nsnull)        return NS_ERROR_FAILURE;    mStatus = status;    if (NS_SUCCEEDED(status)) {        rv = mUserListener->OnFound(mUserContext,                                    mLookup->HostName(),                                    mLookup->HostEntry());        NS_ASSERTION(NS_SUCCEEDED(rv), "OnFound failed");    }    rv = mUserListener->OnStopLookup(mUserContext,                                     mLookup->HostName(),                                     status);    NS_ASSERTION(NS_SUCCEEDED(rv), "OnStopLookup failed");    mUserListener = null_nsCOMPtr();    mUserContext = null_nsCOMPtr();#ifdef DNS_TIMING    if (nsDNSService::gService->mOut) {        PRIntervalTime stopTime = PR_IntervalNow();        double duration = PR_IntervalToMicroseconds(stopTime - mStartTime);        nsDNSService::gService->mCount++;        nsDNSService::gService->mTimes += duration;        nsDNSService::gService->mSquaredTimes += duration * duration;        fprintf(nsDNSService::gService->mOut, "DNS time #%d: %u us for %s\n",                 (PRInt32)nsDNSService::gService->mCount,                (PRInt32)duration, mLookup->HostName());    }#endif    return NS_OK;}