mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1447191 - Pass loadFlags when creating FTP IPDL channel r=mayhemer
This fixes the "Assertion failure: PermissionAvailable(prin, aType), at nsPermissionManager.cpp:2341 when loading FTP URLs on debug builds" MozReview-Commit-ID: 4eRGQ3hrUWo --HG-- extra : rebase_source : 36516275b1fe0f266a08394484e19e0aecfbd671
This commit is contained in:
parent
a04df563ee
commit
966bced714
@ -234,6 +234,7 @@ struct FTPChannelOpenArgs
|
||||
nsCString entityID;
|
||||
OptionalIPCStream uploadStream;
|
||||
OptionalLoadInfoArgs loadInfo;
|
||||
uint32_t loadFlags;
|
||||
};
|
||||
|
||||
struct FTPChannelConnectArgs
|
||||
|
@ -193,11 +193,15 @@ FTPChannelChild::AsyncOpen(::nsIStreamListener* listener, nsISupports* aContext)
|
||||
autoStream.Serialize(mUploadStream,
|
||||
static_cast<ContentChild*>(gNeckoChild->Manager()));
|
||||
|
||||
uint32_t loadFlags = 0;
|
||||
GetLoadFlags(&loadFlags);
|
||||
|
||||
FTPChannelOpenArgs openArgs;
|
||||
SerializeURI(nsBaseChannel::URI(), openArgs.uri());
|
||||
openArgs.startPos() = mStartPos;
|
||||
openArgs.entityID() = mEntityID;
|
||||
openArgs.uploadStream() = autoStream.TakeOptionalValue();
|
||||
openArgs.loadFlags() = loadFlags;
|
||||
|
||||
nsCOMPtr<nsILoadInfo> loadInfo;
|
||||
GetLoadInfo(getter_AddRefs(loadInfo));
|
||||
|
@ -101,7 +101,7 @@ FTPChannelParent::Init(const FTPChannelCreationArgs& aArgs)
|
||||
{
|
||||
const FTPChannelOpenArgs& a = aArgs.get_FTPChannelOpenArgs();
|
||||
return DoAsyncOpen(a.uri(), a.startPos(), a.entityID(), a.uploadStream(),
|
||||
a.loadInfo());
|
||||
a.loadInfo(), a.loadFlags());
|
||||
}
|
||||
case FTPChannelCreationArgs::TFTPChannelConnectArgs:
|
||||
{
|
||||
@ -119,7 +119,8 @@ FTPChannelParent::DoAsyncOpen(const URIParams& aURI,
|
||||
const uint64_t& aStartPos,
|
||||
const nsCString& aEntityID,
|
||||
const OptionalIPCStream& aUploadStream,
|
||||
const OptionalLoadInfoArgs& aLoadInfoArgs)
|
||||
const OptionalLoadInfoArgs& aLoadInfoArgs,
|
||||
const uint32_t& aLoadFlags)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
@ -153,7 +154,7 @@ FTPChannelParent::DoAsyncOpen(const URIParams& aURI,
|
||||
nsCOMPtr<nsIChannel> chan;
|
||||
rv = NS_NewChannelInternal(getter_AddRefs(chan), uri, loadInfo,
|
||||
nullptr, nullptr, nullptr,
|
||||
nsIRequest::LOAD_NORMAL, ios);
|
||||
aLoadFlags, ios);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return SendFailedAsyncOpen(rv);
|
||||
|
@ -80,7 +80,8 @@ protected:
|
||||
bool DoAsyncOpen(const URIParams& aURI, const uint64_t& aStartPos,
|
||||
const nsCString& aEntityID,
|
||||
const OptionalIPCStream& aUploadStream,
|
||||
const OptionalLoadInfoArgs& aLoadInfoArgs);
|
||||
const OptionalLoadInfoArgs& aLoadInfoArgs,
|
||||
const uint32_t& aLoadFlags);
|
||||
|
||||
// used to connect redirected-to channel in parent with just created
|
||||
// ChildChannel. Used during HTTP->FTP redirects.
|
||||
|
Loading…
Reference in New Issue
Block a user