# HG changeset patch # User Ben Kelly # Date 1516721932 18000 # Node ID 7f17473a7b416e433e3dc6a9271eecb925d0a4de # Parent b90fec88ac78b7d4591106d9d875d0f7eaf7a891 Bug 1231211 P4 Set isReload on LoadInfo in docshell. r=asuth diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -10634,16 +10634,21 @@ nsDocShell::DoURILoad(nsIURI* aURI, attrs.SetFirstPartyDomain(isTopLevelDoc, aURI); } rv = loadInfo->SetOriginAttributes(attrs); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } + // Document loads should set the reload flag on the channel so that it + // can be exposed on the service worker FetchEvent. + rv = loadInfo->SetIsDocshellReload(mLoadType & LOAD_CMD_RELOAD); + NS_ENSURE_SUCCESS(rv, rv); + if (!isSrcdoc) { rv = NS_NewChannelInternal(getter_AddRefs(channel), aURI, loadInfo, nullptr, // loadGroup static_cast(this), loadFlags);