Removed getOwner() function from nsIStreamLoader. getChannel() now fulfills this function.

This commit is contained in:
mstoltz%netscape.com 2000-04-27 00:30:27 +00:00
Родитель 884c17fa0b
Коммит 2d56321f9e
5 изменённых файлов: 5 добавлений и 18 удалений

Просмотреть файл

@ -4353,6 +4353,7 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
nsCOMPtr<nsIChannel> channel;
rv = aLoader->GetChannel(getter_AddRefs(channel));
NS_ASSERTION(channel, "StreamLoader's channel went away prematurely");
if (channel) {
httpChannel = do_QueryInterface(channel);
@ -4434,7 +4435,7 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
//-- Merge the principal of the script file with that of the document
nsCOMPtr<nsISupports> owner;
aLoader->GetOwner(getter_AddRefs(owner));
channel->GetOwner(getter_AddRefs(owner));
nsCOMPtr<nsIPrincipal> prin;
if (owner)
{

Просмотреть файл

@ -4353,6 +4353,7 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
nsCOMPtr<nsIChannel> channel;
rv = aLoader->GetChannel(getter_AddRefs(channel));
NS_ASSERTION(channel, "StreamLoader's channel went away prematurely");
if (channel) {
httpChannel = do_QueryInterface(channel);
@ -4434,7 +4435,7 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
//-- Merge the principal of the script file with that of the document
nsCOMPtr<nsISupports> owner;
aLoader->GetOwner(getter_AddRefs(owner));
channel->GetOwner(getter_AddRefs(owner));
nsCOMPtr<nsIPrincipal> prin;
if (owner)
{

Просмотреть файл

@ -57,12 +57,7 @@ interface nsIStreamLoader : nsISupports
readonly attribute unsigned long numBytesRead;
/**
* Gets the owner of this file
*/
readonly attribute nsISupports owner;
/**
* Gets the channel
* Gets the channel that loaded this file
*/
readonly attribute nsIChannel channel;

Просмотреть файл

@ -96,14 +96,6 @@ nsStreamLoader::GetNumBytesRead(PRUint32* aNumBytes)
return NS_OK;
}
NS_IMETHODIMP
nsStreamLoader::GetOwner(nsISupports** aOwner)
{
*aOwner = mOwner.get();
NS_IF_ADDREF(*aOwner);
return NS_OK;
}
NS_IMETHODIMP
nsStreamLoader::GetChannel(nsIChannel** aChannel)
{
@ -122,7 +114,6 @@ NS_IMETHODIMP
nsStreamLoader::OnStopRequest(nsIChannel* channel, nsISupports *ctxt,
nsresult status, const PRUnichar *errorMsg)
{
(void)channel->GetOwner(getter_AddRefs(mOwner));
mChannel = channel;
nsresult rv = mObserver->OnStreamComplete(this, mContext, status,
mData.Length(),

Просмотреть файл

@ -47,7 +47,6 @@ protected:
nsCOMPtr<nsIStreamLoaderObserver> mObserver;
nsCOMPtr<nsISupports> mContext; // the observer's context
nsCString mData;
nsCOMPtr<nsISupports> mOwner;
nsCOMPtr<nsIChannel> mChannel;
/// nsCOMPtr<nsILoadGroup> mLoadGroup;
};