Give service workers a factory bundle from the browser. |
||||
Issue description
We have to give service workers a bundle like we do shared workers, so chrome-extension:// URLs work if needed.
Otherwise probably fetch('resource'); from an extension service worker doesn't work.
We are making a bundle now but only using it for ServiceWorkerScriptLoaderFactory.
,
Jul 25
@falken, is there anything needed here? does it need block canary?
,
Jul 25
Yeah... currently fetch('resource') from an chrome-extension:// service worker will not work.
It's not clear how widely those are used...
I don't think it should block Canary. It should be fixed, but if NS is ready to go to Canary before that, we can go ahead and see if people complain.
,
Aug 16
let's keep this as non-blocking and see what happens on canary.
,
Aug 16
Tenatitively assigning to bashi but I can take it back if time frees up. We'd ideally get this in for 70 as NS is aiming for that.
,
Aug 30
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/773b8297a2e88c54d42967b53d526bffab669d59 commit 773b8297a2e88c54d42967b53d526bffab669d59 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Thu Aug 30 07:02:03 2018 S13nServiceWorker: Pass factory bundle to renderer The renderer's default network loader can't handle non-network URLs such as chrome-extension://. This means that fetch() for extension resources from an extension service worker wouldn't work when we use the default network loader. To make such requests work, pass a URLLoaderFactoryBundle from browser in a similar manner to shared worker. Bug: 848628 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: Ia356a668a75efec9de854828dadc69cea0294e09 Reviewed-on: https://chromium-review.googlesource.com/1187856 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#587466} [modify] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/chrome/browser/extensions/service_worker_apitest.cc [add] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/chrome/test/data/extensions/api_test/service_worker/background/fetch_from_sw.js [add] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/chrome/test/data/extensions/api_test/service_worker/background/hello.txt [modify] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/content/browser/service_worker/embedded_worker_instance.cc [modify] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/content/common/service_worker/embedded_worker.mojom [modify] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/content/renderer/service_worker/embedded_worker_instance_client_impl.cc [modify] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/content/renderer/service_worker/service_worker_context_client.cc [modify] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/content/renderer/service_worker/service_worker_context_client.h [modify] https://crrev.com/773b8297a2e88c54d42967b53d526bffab669d59/content/renderer/service_worker/service_worker_context_client_unittest.cc
,
Aug 30
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dxie@chromium.org
, Jun 8 2018