r=valeski, exposing channel for 32604 Trunk fix for illegal use of nsString-external JavaScript

This commit is contained in:
jbetak%netscape.com 2000-04-14 02:46:28 +00:00
Родитель e7ee535788
Коммит b74494e409
3 изменённых файлов: 16 добавлений и 0 удалений

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

@ -60,6 +60,12 @@ interface nsIStreamLoader : nsISupports
* Gets the owner of this file
*/
readonly attribute nsISupports owner;
/**
* Gets the channel
*/
readonly attribute nsIChannel channel;
};
%{C++

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

@ -104,6 +104,14 @@ nsStreamLoader::GetOwner(nsISupports** aOwner)
return NS_OK;
}
NS_IMETHODIMP
nsStreamLoader::GetChannel(nsIChannel** aChannel)
{
*aChannel = mChannel.get();
NS_IF_ADDREF(*aChannel);
return NS_OK;
}
NS_IMETHODIMP
nsStreamLoader::OnStartRequest(nsIChannel* channel, nsISupports *ctxt)
{
@ -115,6 +123,7 @@ 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(),
mData.GetBuffer());

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

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