mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 965413 part 7. Make it safe to GetOwner() and SetOwner() on channels without asserting. r=smaug
We're going to want to check whether a channel has an existing owner in some cases, but some channels currently assert if you just ask them whether they have an owner.
This commit is contained in:
parent
5f10c0c658
commit
da8d201a1f
@ -451,10 +451,7 @@ WyciwygChannelChild::GetURI(nsIURI * *aURI)
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
WyciwygChannelChild::GetOwner(nsISupports * *aOwner)
|
WyciwygChannelChild::GetOwner(nsISupports * *aOwner)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(mOwner, "Must have a principal!");
|
NS_IF_ADDREF(*aOwner = mOwner);
|
||||||
NS_ENSURE_STATE(mOwner);
|
|
||||||
|
|
||||||
NS_ADDREF(*aOwner = mOwner);
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -271,10 +271,7 @@ nsWyciwygChannel::GetURI(nsIURI* *aURI)
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWyciwygChannel::GetOwner(nsISupports **aOwner)
|
nsWyciwygChannel::GetOwner(nsISupports **aOwner)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(mOwner, "Must have a principal!");
|
NS_IF_ADDREF(*aOwner = mOwner);
|
||||||
NS_ENSURE_STATE(mOwner);
|
|
||||||
|
|
||||||
NS_ADDREF(*aOwner = mOwner);
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,13 +256,11 @@ nsExtProtocolChannel::SetContentLength(int64_t aContentLength)
|
|||||||
|
|
||||||
NS_IMETHODIMP nsExtProtocolChannel::GetOwner(nsISupports * *aPrincipal)
|
NS_IMETHODIMP nsExtProtocolChannel::GetOwner(nsISupports * *aPrincipal)
|
||||||
{
|
{
|
||||||
NS_NOTREACHED("GetOwner");
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsExtProtocolChannel::SetOwner(nsISupports * aPrincipal)
|
NS_IMETHODIMP nsExtProtocolChannel::SetOwner(nsISupports * aPrincipal)
|
||||||
{
|
{
|
||||||
NS_NOTREACHED("SetOwner");
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user