("DocLoader - OnStartBinding(...) called for %s.  Content-type is %s\n", spec, aContentType));
("DocumentBindInfo:%p OnStartBinding(...) called for %s.  Content-type is %s\n", this, spec, aContentType));
NS_METHOD nsDocumentBindInfo::OnStartBinding(nsIURL* aURL, const char *aContentType){    nsresult rv = NS_OK;    nsIContentViewer* viewer = nsnull;#if defined(DEBUG)    const char* spec;    (void)aURL->GetSpec(&spec);    PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,            ("DocLoader - OnStartBinding(...) called for %s.  Content-type is %s\n",            spec, aContentType));#endif /* DEBUG */    /* If the binding has been canceled via Stop() then abort the load... */    if (NS_BINDING_ABORTED == mStatus) {        rv = NS_BINDING_ABORTED;        goto done;    }    if (nsnull == m_NextStream) {        /*         * Now that the content type is available, create a document (and viewer)         * of the appropriate type...         */        if (m_DocLoader->m_DocFactory) {            rv = m_DocLoader->m_DocFactory->CreateInstance(m_Url,                                                           aContentType,                                                            m_Command,                                                            m_Container,                                                           m_ExtraInfo,                                                           &m_NextStream,                                                            &viewer);        } else {            rv = NS_ERROR_NULL_POINTER;        }        if (NS_FAILED(rv)) {            printf("DocLoaderFactory: Unable to create ContentViewer for content-type: %s\n", aContentType);            if ( m_Container ) {                // Give content container a chance to do something with this URL.                rv = m_Container->HandleUnknownContentType( (nsIDocumentLoader*) m_DocLoader, aURL, aContentType, m_Command );            }            // Stop the binding.            // This crashes on Unix/Mac... Stop();            goto done;        }        /*         * Give the document container the new viewer...         */        if (m_Container) {            viewer->SetContainer(m_Container);            rv = m_Container->Embed(viewer, m_Command, m_ExtraInfo);            if (NS_FAILED(rv)) {                goto done;            }        }    }    /*     * Pass the OnStartBinding(...) notification out to the document      * IStreamListener.     */    if (nsnull != m_NextStream) {        rv = m_NextStream->OnStartBinding(aURL, aContentType);    }    /*     * Notify the DocumentLoadObserver(s)      */    if ((nsnull == viewer) && (nsnull != m_Container)) {      m_Container->GetContentViewer(&viewer);    }    m_DocLoader->FireOnStartURLLoad(m_Url, aContentType, viewer);    /* Pass the notification out to the Observer... */    if (nsnull != m_Observer) {        nsresult rv2 = m_Observer->OnStartBinding(aURL, aContentType);        if (NS_SUCCEEDED(rv))        	rv = rv2;    }done:    NS_IF_RELEASE(viewer);    return rv;}