if (event) event->OnInputStreamReady(nsnull);
if (event) { nsresult rv = event->OnInputStreamReady(nsnull); if (NS_FAILED(rv)) {   NS_NOTREACHED("leaking stream event"); NS_ADDREF(event); } }
    virtual ~nsInputStreamReadyEvent()    {        if (mNotify) {            //            // whoa!! looks like we never posted this event. take care not to            // delete mNotify on the calling thread (which might be the wrong            // thread).            //            nsCOMPtr<nsIInputStreamNotify> event;            NS_NewInputStreamReadyEvent(getter_AddRefs(event), mNotify, mEventQ);            mNotify = 0;            if (event)                event->OnInputStreamReady(nsnull);        }    }