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

Unified Diff: content/browser/service_worker/service_worker_context_core.cc

Issue 2061203002: WIP Reland: service worker: Don't control a subframe of an insecure context Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maybe fix drmemory Created 4 years, 6 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: content/browser/service_worker/service_worker_context_core.cc
diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc
index 6bb3ee1ee92f670717ec46715baf47b4c75be6e2..2db3464318f900b4b407e646fcaf8c8ae9359e90 100644
--- a/content/browser/service_worker/service_worker_context_core.cc
+++ b/content/browser/service_worker/service_worker_context_core.cc
@@ -632,13 +632,13 @@ ServiceWorkerContextCore::TransferProviderHostOut(int process_id,
int provider_id) {
ProviderMap* map = GetProviderMapForProcess(process_id);
ServiceWorkerProviderHost* transferee = map->Lookup(provider_id);
- ServiceWorkerProviderHost* replacement =
- new ServiceWorkerProviderHost(process_id,
- transferee->frame_id(),
- provider_id,
- transferee->provider_type(),
- AsWeakPtr(),
- transferee->dispatcher_host());
+ ServiceWorkerProviderHost* replacement = new ServiceWorkerProviderHost(
+ process_id, transferee->frame_id(), provider_id,
+ transferee->provider_type(),
+ transferee->is_parent_frame_secure()
+ ? ServiceWorkerProviderHost::FrameSecurityLevel::SECURE
+ : ServiceWorkerProviderHost::FrameSecurityLevel::INSECURE,
+ AsWeakPtr(), transferee->dispatcher_host());
map->Replace(provider_id, replacement);
transferee->PrepareForCrossSiteTransfer();
return base::WrapUnique(transferee);

Powered by Google App Engine
This is Rietveld 408576698