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

Unified Diff: third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp

Issue 2890723002: Set the requester context info to the requests for off-main-thread-fetch. (Closed)
Patch Set: Created 3 years, 7 months 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/core/loader/WorkerFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp b/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
index d4830069f643e0b183069986e0f4e13af1dbf27d..1032702193fa0737e234365691cf2c7146b4b08e 100644
--- a/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
@@ -165,6 +165,8 @@ bool WorkerFetchContext::IsControlledByServiceWorker() const {
void WorkerFetchContext::PrepareRequest(ResourceRequest& request,
RedirectType) {
request.OverrideLoadingIPCType(WebURLRequest::LoadingIPCType::kMojo);
+ if (request.RequestorOrigin()->IsUnique())
+ request.SetRequestorOrigin(worker_global_scope_->GetSecurityOrigin());
WrappedResourceRequest webreq(request);
web_context_->WillSendRequest(webreq);
}

Powered by Google App Engine
This is Rietveld 408576698