if (aChannel) { nsCOMPtr<nsIURI> uri; aChannel->GetOriginalURI(getter_AddRefs(uri)); if (uri) { mDocument->ReportMissingOverlay(uri); } }
if (!aChannel) return NS_ERROR_FAILURE;  nsCOMPtr<nsIURI> uri; aChannel->GetOriginalURI(getter_AddRefs(uri));  nsCAutoString spec; uri->GetSpec(spec);  printf("*** Failed to load overlay %s\n", spec.get()); #endif
nsXULDocument::ParserObserver::OnStopRequest(nsIRequest *request,                                             nsISupports* aContext,                                             nsresult aStatus){    nsresult rv = NS_OK;    if (NS_FAILED(aStatus)) {        // If an overlay load fails, we need to nudge the prototype        // walk along.        nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(request);        if (aChannel) {            nsCOMPtr<nsIURI> uri;            aChannel->GetOriginalURI(getter_AddRefs(uri));            if (uri) {                mDocument->ReportMissingOverlay(uri);            }        }        rv = mDocument->ResumeWalk();    }    // Drop the reference to the document to break cycle between the    // document, the parser, the content sink, and the parser    // observer.    NS_RELEASE(mDocument);    return rv;}