Issue metadata
Sign in to add a comment
|
Deprecate importScripts for non-installed scripts |
||||||||||||||||||||||
Issue description
Service workers can currently do
importScripts('script-that-was-never-installed.js');
We need to ban this. UMA suggests that 0.25% of importScripts() on Windows does this, and 0.80% on Android.
Tasks:
- Pipe whether the script was installed to ResourceResponse.
- In ServiceWorkerGlobalScope, if the script was not installed, print a deprecation warning.
I don't know how to track down which sites are doing this.... UKM or RAPPOR?
,
Jun 27 2017
,
Jun 28 2017
What's "installed" in this case?
,
Jun 28 2017
nekr.fabula: See https://github.com/w3c/ServiceWorker/issues/1021#issuecomment-266708110 (just updated the issue description too). The service worker shouldn't do importScripts() for a script that wasn't already imported at the time of installation.
,
Jun 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d227e663c9fb97a44ca0db3264693d51cda6050 commit 0d227e663c9fb97a44ca0db3264693d51cda6050 Author: Matt Falkenhagen <falken@chromium.org> Date: Wed Jun 28 03:16:05 2017 service worker: Add RAPPOR for non-installed importScripts() I want to deprecate this spec violation out there is apparently a fair amount of usage in wild. Add RAPPOR to discover where the usage is coming from. Bug: 737044 Change-Id: If0090b6793387a2a1f4c9d9236b7bcc6ecb7186a Reviewed-on: https://chromium-review.googlesource.com/549742 Commit-Queue: Matt Falkenhagen <falken@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Steven Holte <holte@chromium.org> Cr-Commit-Position: refs/heads/master@{#482869} [modify] https://crrev.com/0d227e663c9fb97a44ca0db3264693d51cda6050/content/browser/service_worker/service_worker_context_request_handler.cc [modify] https://crrev.com/0d227e663c9fb97a44ca0db3264693d51cda6050/content/browser/service_worker/service_worker_metrics.cc [modify] https://crrev.com/0d227e663c9fb97a44ca0db3264693d51cda6050/content/browser/service_worker/service_worker_metrics.h [modify] https://crrev.com/0d227e663c9fb97a44ca0db3264693d51cda6050/tools/metrics/rappor/rappor.xml
,
Jun 29 2017
,
Jun 29 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by falken@chromium.org
, Jun 27 2017