nsresult rv;
nsresult rv = GetStatus(); if (NS_FAILED(rv)) return rv;
nsAsyncStreamObserver::OnStartRequest(nsIChannel* channel, nsISupports* context){    nsresult rv;    nsOnStartRequestEvent* event =         new nsOnStartRequestEvent(this, channel, context);    if (event == nsnull)        return NS_ERROR_OUT_OF_MEMORY;#if defined(PR_LOGGING)    PLEventQueue *equeue;    mEventQueue->GetPLEventQueue(&equeue);    char ts[80];    sprintf(ts, "nsAsyncStreamObserver: Start [this=%lx queue=%lx",            (long)this, (long)equeue);    if (!gStreamEventLog)      gStreamEventLog = PR_NewLogModule("netlibStreamEvent");    PR_LOG(gStreamEventLog, PR_LOG_DEBUG,           ("nsAsyncStreamObserver: Start [this=%x queue=%x event=%x]",            this, equeue, event));#endif    rv = event->Fire(mEventQueue);    if (NS_FAILED(rv)) goto failed;    return rv;  failed:    delete event;    return rv;}