From a82d2ce0634d62a8cca9a39d30281be119e6ce6c Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 1 Nov 2000 08:04:49 +0000 Subject: [PATCH] Bug #56938 --> add a method for retrieving the doc loader's document channel. r=sspitzer, sr=rpotts --- uriloader/base/nsDocLoader.cpp | 7 +++++++ uriloader/base/nsIDocumentLoader.idl | 1 + 2 files changed, 8 insertions(+) diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 3d8bce45901..939af8e2f24 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -571,6 +571,13 @@ nsresult nsDocLoaderImpl::RemoveChildGroup(nsDocLoaderImpl* aLoader) return rv; } +NS_IMETHODIMP nsDocLoaderImpl::GetDocumentChannel(nsIChannel ** aChannel) +{ + *aChannel = mDocumentChannel; + NS_IF_ADDREF(*aChannel); + return NS_OK; +} + void nsDocLoaderImpl::DocLoaderIsEmpty(nsresult aStatus) { diff --git a/uriloader/base/nsIDocumentLoader.idl b/uriloader/base/nsIDocumentLoader.idl index 9102736d38a..9842a40e00b 100644 --- a/uriloader/base/nsIDocumentLoader.idl +++ b/uriloader/base/nsIDocumentLoader.idl @@ -51,6 +51,7 @@ interface nsIDocumentLoader : nsISupports // this should really be in a private interface as it is only // called between a parent doc loader and it's child. void clearParentDocLoader(); + readonly attribute nsIChannel documentChannel; void fireOnLocationChange(in nsIWebProgress aWebProgress, in nsIRequest aRequest,