Bug 1312646 - Carry ChooseApplicationCache flag from child after redirect callback is done. r=jduell

--HG--
extra : rebase_source : c91b0722331e9bd897fa97cd380691296b408871
This commit is contained in:
Honza Bambas 2016-10-27 06:13:00 -04:00
parent c2721a5026
commit 1e4dc15ed4
4 changed files with 20 additions and 4 deletions

View File

@ -1684,10 +1684,17 @@ HttpChannelChild::OnRedirectVerifyCallback(nsresult result)
}
}
bool chooseAppcache = false;
nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
do_QueryInterface(newHttpChannel);
if (appCacheChannel) {
appCacheChannel->GetChooseApplicationCache(&chooseAppcache);
}
if (mIPCOpen)
SendRedirect2Verify(result, *headerTuples, loadFlags, redirectURI,
corsPreflightArgs, forceHSTSPriming,
mixedContentWouldBlock);
mixedContentWouldBlock, chooseAppcache);
return NS_OK;
}

View File

@ -697,7 +697,8 @@ HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
const OptionalURIParams& aAPIRedirectURI,
const OptionalCorsPreflightArgs& aCorsPreflightArgs,
const bool& aForceHSTSPriming,
const bool& aMixedContentWouldBlock)
const bool& aMixedContentWouldBlock,
const bool& aChooseAppcache)
{
LOG(("HttpChannelParent::RecvRedirect2Verify [this=%p result=%x]\n",
this, result));
@ -743,6 +744,12 @@ HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
newLoadInfo->SetHSTSPriming(aMixedContentWouldBlock);
}
}
nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
do_QueryInterface(newHttpChannel);
if (appCacheChannel) {
appCacheChannel->SetChooseApplicationCache(aChooseAppcache);
}
}
}

View File

@ -155,7 +155,8 @@ protected:
const OptionalURIParams& apiRedirectUri,
const OptionalCorsPreflightArgs& aCorsPreflightArgs,
const bool& aForceHSTSPriming,
const bool& aMixedContentWouldBlock) override;
const bool& aMixedContentWouldBlock,
const bool& aChooseAppcache) override;
virtual bool RecvUpdateAssociatedContentSecurity(const int32_t& broken,
const int32_t& no) override;
virtual bool RecvDocumentChannelCleanup() override;

View File

@ -47,7 +47,8 @@ parent:
async Redirect2Verify(nsresult result, RequestHeaderTuples changedHeaders,
uint32_t loadFlags, OptionalURIParams apiRedirectTo,
OptionalCorsPreflightArgs corsPreflightArgs,
bool forceHSTSPriming, bool mixedContentWouldBlock);
bool forceHSTSPriming, bool mixedContentWouldBlock,
bool chooseAppcache);
// For document loads we keep this protocol open after child's
// OnStopRequest, and send this msg (instead of __delete__) to allow