зеркало из https://github.com/mozilla/gecko-dev.git
r=valeski, exposing channel for 32604 Trunk fix for illegal use of nsString-external JavaScript
This commit is contained in:
Родитель
e7ee535788
Коммит
b74494e409
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче