Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 2526343003: Introduce new security restrictions in FetchEvent.respondWith(). (Closed)
Patch Set: incorporated falken's comment Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index bedc1c68049fcde2065e8f3ffb1c10fc92706834..28ac4a83091c61a0dd1579cfb352a362815eee0f 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -167,7 +167,8 @@ void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(
workerGlobalScope(), WaitUntilObserver::Fetch, fetchEventID);
RespondWithObserver* respondWithObserver = RespondWithObserver::create(
workerGlobalScope(), fetchEventID, webRequest.url(), webRequest.mode(),
- webRequest.frameType(), webRequest.requestContext(), waitUntilObserver);
+ webRequest.redirectMode(), webRequest.frameType(),
+ webRequest.requestContext(), waitUntilObserver);
Request* request = Request::create(
workerGlobalScope()->scriptController()->getScriptState(), webRequest);
request->getHeaders()->setGuard(Headers::ImmutableGuard);
@@ -244,7 +245,7 @@ void ServiceWorkerGlobalScopeProxy::dispatchForeignFetchEvent(
ForeignFetchRespondWithObserver* respondWithObserver =
ForeignFetchRespondWithObserver::create(
workerGlobalScope(), fetchEventID, webRequest.url(),
- webRequest.mode(), webRequest.frameType(),
+ webRequest.mode(), webRequest.redirectMode(), webRequest.frameType(),
webRequest.requestContext(), origin, waitUntilObserver);
Request* request = Request::create(
workerGlobalScope()->scriptController()->getScriptState(), webRequest);

Powered by Google App Engine
This is Rietveld 408576698