if (NS_FAILED(aStatus)) { char *url; aURL->GetSpec(&url);
mIsLoadingDocument = PR_FALSE;
NS_METHOD nsDocumentBindInfo::OnStopRequest(nsIChannel* channel, nsISupports *ctxt,                                            nsresult aStatus, const PRUnichar *aMsg){    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: OnStopRequest(...) called for %s.  Status: %d.\n",             this, spec, aStatus));    nsCRT::free(spec);#endif // DEBUG    if (NS_FAILED(aStatus)) {        char *url;        aURL->GetSpec(&url);        if (aStatus == NS_ERROR_UNKNOWN_HOST)            printf("Error: Unknown host: %s\n", url);        else if (aStatus == NS_ERROR_MALFORMED_URI)            printf("Error: Malformed URI: %s\n", url);        else if (NS_FAILED(aStatus))            printf("Error: Can't load: %s (%x)\n", url, aStatus);        nsCRT::free(url);    }    if (nsnull != m_NextStream) {        rv = m_NextStream->OnStopRequest(channel, ctxt, aStatus, aMsg);    }    /* Pass the notification out to the Observer... */    if (nsnull != m_Observer) {        /* XXX: Should we ignore the return value? */        (void) m_Observer->OnStopRequest(channel, ctxt, aStatus, aMsg);    }    NS_IF_RELEASE(m_NextStream);    return rv;}