Put the GetInterface for the uriContentListener into an ifndef for DOCSHELL_LOAD so when DOCSHELL_LOADING is turned on, we get the right handler.

This commit is contained in:
tbogard@aol.net
2000-04-12 10:00:04 +00:00
parent 58d0075563
commit 4bc186b33b
2 changed files with 8 additions and 0 deletions

View File

@@ -118,6 +118,8 @@ static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_C
//XXX for nsIPostData; this is wrong; we shouldn't see the nsIDocument type
#include "nsIDocument.h"
//#define DOCSHELL_LOAD 1
#ifdef DEBUG
#undef NOISY_LINKS
#undef NOISY_WEBSHELL_LEAKS
@@ -686,12 +688,14 @@ nsWebShell::GetInterface(const nsIID &aIID, void** aInstancePtr)
NS_ADDREF((nsISupports*)*aInstancePtr);
return NS_OK;
}
#ifndef DOCSHELL_LOAD
else if (aIID.Equals(NS_GET_IID(nsIURIContentListener)))
{
*aInstancePtr = NS_STATIC_CAST(nsIURIContentListener*, this);
NS_ADDREF((nsISupports*)*aInstancePtr);
return NS_OK;
}
#endif /* DOCSHELL_LOAD */
else if(aIID.Equals(NS_GET_IID(nsIScriptGlobalObject)))
{
NS_ENSURE_SUCCESS(EnsureScriptEnvironment(), NS_ERROR_FAILURE);