mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1194519 - call AsyncOpen2 within child and parent if securityFlags are present (r=jduell)
This commit is contained in:
parent
5cc836a140
commit
9d3911f687
@ -40,7 +40,14 @@ NS_IMETHODIMP
|
||||
DataChannelChild::CompleteRedirectSetup(nsIStreamListener *aListener,
|
||||
nsISupports *aContext)
|
||||
{
|
||||
nsresult rv = AsyncOpen(aListener, aContext);
|
||||
nsresult rv;
|
||||
if (mLoadInfo && mLoadInfo->GetEnforceSecurity()) {
|
||||
MOZ_ASSERT(!aContext, "aContext should be null!");
|
||||
rv = AsyncOpen2(aListener);
|
||||
}
|
||||
else {
|
||||
rv = AsyncOpen(aListener, aContext);
|
||||
}
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -188,10 +188,16 @@ FTPChannelParent::DoAsyncOpen(const URIParams& aURI,
|
||||
if (NS_FAILED(rv))
|
||||
return SendFailedAsyncOpen(rv);
|
||||
|
||||
rv = ftpChan->AsyncOpen(this, nullptr);
|
||||
if (loadInfo && loadInfo->GetEnforceSecurity()) {
|
||||
rv = ftpChan->AsyncOpen2(this);
|
||||
}
|
||||
else {
|
||||
rv = ftpChan->AsyncOpen(this, nullptr);
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return SendFailedAsyncOpen(rv);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1307,6 +1307,10 @@ HttpChannelChild::CompleteRedirectSetup(nsIStreamListener *listener,
|
||||
// fresh - we will intercept the child channel this time, before creating a new
|
||||
// parent channel unnecessarily.
|
||||
PHttpChannelChild::Send__delete__(this);
|
||||
if (mLoadInfo && mLoadInfo->GetEnforceSecurity()) {
|
||||
MOZ_ASSERT(!aContext, "aContext should be null!");
|
||||
return AsyncOpen2(listener);
|
||||
}
|
||||
return AsyncOpen(listener, aContext);
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,12 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
|
||||
schedulingContextID.Parse(aSchedulingContextID.BeginReading());
|
||||
mChannel->SetSchedulingContextID(schedulingContextID);
|
||||
|
||||
rv = mChannel->AsyncOpen(mParentListener, nullptr);
|
||||
if (loadInfo && loadInfo->GetEnforceSecurity()) {
|
||||
rv = mChannel->AsyncOpen2(mParentListener);
|
||||
}
|
||||
else {
|
||||
rv = mChannel->AsyncOpen(mParentListener, nullptr);
|
||||
}
|
||||
if (NS_FAILED(rv))
|
||||
return SendFailedAsyncOpen(rv);
|
||||
|
||||
|
@ -280,6 +280,10 @@ NS_IMETHODIMP
|
||||
RtspChannelChild::CompleteRedirectSetup(nsIStreamListener *aListener,
|
||||
nsISupports *aContext)
|
||||
{
|
||||
if (mLoadInfo && mLoadInfo->GetEnforceSecurity()) {
|
||||
MOZ_ASSERT(!aContext, "aContext should be null!");
|
||||
return AsyncOpen2(aListener);
|
||||
}
|
||||
return AsyncOpen(aListener, aContext);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,14 @@ WyciwygChannelParent::RecvAsyncOpen(const URIParams& aOriginal,
|
||||
if (NS_FAILED(rv))
|
||||
return SendCancelEarly(rv);
|
||||
|
||||
rv = mChannel->AsyncOpen(this, nullptr);
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = mChannel->GetLoadInfo();
|
||||
if (loadInfo && loadInfo->GetEnforceSecurity()) {
|
||||
rv = mChannel->AsyncOpen2(this);
|
||||
}
|
||||
else {
|
||||
rv = mChannel->AsyncOpen(this, nullptr);
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return SendCancelEarly(rv);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user