NS_METHOD nsDocumentBindInfo::OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *aStream, PRUint32 sourceOffset, PRUint32 aLength)
nsChannelListener::OnDataAvailable(nsIChannel *aChannel, nsISupports *aContext, nsIInputStream *aInStream, PRUint32 aOffset, PRUint32 aCount)
NS_METHOD nsDocumentBindInfo::OnDataAvailable(nsIChannel* channel, nsISupports *ctxt,                                              nsIInputStream *aStream,                                               PRUint32 sourceOffset,                                               PRUint32 aLength){    nsresult rv;    nsCOMPtr<nsIURI> aURL;    rv = channel->GetURI(getter_AddRefs(aURL));    if (NS_FAILED(rv)) return rv;#if defined(DEBUG)    char* spec;    (void)aURL->GetSpec(&spec);    PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,            ("DocumentBindInfo:%p: OnDataAvailable(...) called for %s.  Bytes available: %d.\n",             this, spec, aLength));    nsCRT::free(spec);#endif /* DEBUG */    if (nsnull != m_NextStream) {       /*        * Bump the refcount in case the stream gets destroyed while the data        * is being processed...  If Stop(...) is called the stream could be        * freed prematurely :-(        *        * Currently this can happen if javascript loads a new URL         * (via nsIWebShell::LoadURL) during the parse phase...         */        nsCOMPtr<nsIStreamListener> listener(m_NextStream);        rv = listener->OnDataAvailable(channel, ctxt, aStream, sourceOffset, aLength);    } else {      rv = NS_BINDING_FAILED;    }    return rv;}