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

Unified Diff: content/renderer/shared_worker/embedded_shared_worker_stub.cc

Issue 2890723002: Set the requester context info to the requests for off-main-thread-fetch. (Closed)
Patch Set: rebase 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: content/renderer/shared_worker/embedded_shared_worker_stub.cc
diff --git a/content/renderer/shared_worker/embedded_shared_worker_stub.cc b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
index 090ba0ea4fd31039ad3866583fe56dec69014507..6183ad5cb6c7262f03b914f7c65a5430b15f8d36 100644
--- a/content/renderer/shared_worker/embedded_shared_worker_stub.cc
+++ b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
@@ -272,6 +272,12 @@ EmbeddedSharedWorkerStub::CreateWorkerFetchContext(
std::unique_ptr<WorkerFetchContextImpl> worker_fetch_context =
base::MakeUnique<WorkerFetchContextImpl>(
worker_url_loader_factory_provider.PassInterface());
+ // TODO(horo): Currently we treat the worker context as secure if the origin
+ // of the shared worker script url is secure. But according to the spec, if
+ // the creation context is not secure, we should treat the worker as
+ // non-secure. crbug.com/723575
falken 2017/05/18 02:14:13 just to confirm, this is not a regression with off
horo 2017/05/18 03:59:53 Yes this is an existing bug even without OffMainTh
+ // https://www.w3.org/TR/secure-contexts/#examples-shared-workers
falken 2017/05/18 02:14:13 link to the newest spec: https://w3c.github.io/web
horo 2017/05/18 03:59:53 Done.
+ worker_fetch_context->set_is_secure_context(IsOriginSecure(url_));
if (web_network_provider) {
ServiceWorkerNetworkProvider* network_provider =
ServiceWorkerNetworkProvider::FromWebServiceWorkerNetworkProvider(

Powered by Google App Engine
This is Rietveld 408576698