Bug 1210941 P4 Use LOAD_BYPASS_SERVICE_WORKER instead of ForceNoIntercept in nsDocShell. r=ehsan

This commit is contained in:
Ben Kelly 2015-10-06 06:37:07 -07:00
parent 568567e9f3
commit 6f5ac6af87

View File

@ -10897,17 +10897,14 @@ nsDocShell::DoChannelLoad(nsIChannel* aChannel,
loadFlags |= nsIChannel::LOAD_CLASSIFY_URI;
}
(void)aChannel->SetLoadFlags(loadFlags);
// If the user pressed shift-reload, then do not allow ServiceWorker
// interception to occur. See step 12.1 of the SW HandleFetch algorithm.
if (IsForceReloadType(mLoadType)) {
nsCOMPtr<nsIHttpChannelInternal> internal = do_QueryInterface(aChannel);
if (internal) {
internal->ForceNoIntercept();
}
loadFlags |= nsIChannel::LOAD_BYPASS_SERVICE_WORKER;
}
(void)aChannel->SetLoadFlags(loadFlags);
uint32_t openFlags = 0;
if (mLoadType == LOAD_LINK) {
openFlags |= nsIURILoader::IS_CONTENT_PREFERRED;