зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1120715 - Part 3: Connect the Necko level cache mode parameter with the Request cache mode variable; r=bkelly
This commit is contained in:
Родитель
456b0a7460
Коммит
d9ecb20ef6
|
@ -332,6 +332,7 @@ FetchDriver::HttpFetch()
|
|||
// dom/workers/ServiceWorkerManager.cpp
|
||||
internalChan->SetCorsMode(static_cast<uint32_t>(mRequest->Mode()));
|
||||
internalChan->SetRedirectMode(static_cast<uint32_t>(mRequest->GetRedirectMode()));
|
||||
internalChan->SetFetchCacheMode(static_cast<uint32_t>(mRequest->GetCacheMode()));
|
||||
}
|
||||
|
||||
// Step 5. Proxy authentication will be handled by Necko.
|
||||
|
|
|
@ -117,6 +117,7 @@ public:
|
|||
InternalRequest(const nsACString& aURL,
|
||||
const nsACString& aMethod,
|
||||
already_AddRefed<InternalHeaders> aHeaders,
|
||||
RequestCache aCacheMode,
|
||||
RequestMode aMode,
|
||||
RequestRedirect aRequestRedirect,
|
||||
RequestCredentials aRequestCredentials,
|
||||
|
@ -132,7 +133,7 @@ public:
|
|||
, mMode(aMode)
|
||||
, mCredentialsMode(aRequestCredentials)
|
||||
, mResponseTainting(LoadTainting::Basic)
|
||||
, mCacheMode(RequestCache::Default)
|
||||
, mCacheMode(aCacheMode)
|
||||
, mRedirectMode(aRequestRedirect)
|
||||
, mAuthenticationFlag(false)
|
||||
, mForceOriginHeader(false)
|
||||
|
|
|
@ -990,6 +990,7 @@ class FetchEventRunnable : public ExtendableFunctionalEventWorkerRunnable
|
|||
nsCString mMethod;
|
||||
nsString mClientId;
|
||||
bool mIsReload;
|
||||
RequestCache mCacheMode;
|
||||
RequestMode mRequestMode;
|
||||
RequestRedirect mRequestRedirect;
|
||||
RequestCredentials mRequestCredentials;
|
||||
|
@ -1013,6 +1014,7 @@ public:
|
|||
, mScriptSpec(aScriptSpec)
|
||||
, mClientId(aDocumentId)
|
||||
, mIsReload(aIsReload)
|
||||
, mCacheMode(RequestCache::Default)
|
||||
, mRequestMode(RequestMode::No_cors)
|
||||
, mRequestRedirect(RequestRedirect::Follow)
|
||||
// By default we set it to same-origin since normal HTTP fetches always
|
||||
|
@ -1110,11 +1112,16 @@ public:
|
|||
|
||||
mRequestMode = InternalRequest::MapChannelToRequestMode(channel);
|
||||
|
||||
// This is safe due to static_asserts at top of file.
|
||||
// This is safe due to static_asserts in ServiceWorkerManager.cpp.
|
||||
uint32_t redirectMode;
|
||||
internalChannel->GetRedirectMode(&redirectMode);
|
||||
mRequestRedirect = static_cast<RequestRedirect>(redirectMode);
|
||||
|
||||
// This is safe due to static_asserts in ServiceWorkerManager.cpp.
|
||||
uint32_t cacheMode;
|
||||
internalChannel->GetFetchCacheMode(&cacheMode);
|
||||
mCacheMode = static_cast<RequestCache>(cacheMode);
|
||||
|
||||
mRequestCredentials = InternalRequest::MapChannelToRequestCredentials(channel);
|
||||
|
||||
rv = httpChannel->VisitNonDefaultRequestHeaders(this);
|
||||
|
@ -1206,6 +1213,7 @@ private:
|
|||
RefPtr<InternalRequest> internalReq = new InternalRequest(mSpec,
|
||||
mMethod,
|
||||
internalHeaders.forget(),
|
||||
mCacheMode,
|
||||
mRequestMode,
|
||||
mRequestRedirect,
|
||||
mRequestCredentials,
|
||||
|
|
Загрузка…
Ссылка в новой задаче