Closed
Bug 1400372
Opened 7 years ago
Closed 7 years ago
Fix service worker updates when importScripts() redirects
Categories
(Core :: DOM: Service Workers, enhancement, P2)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: bkelly, Assigned: bkelly)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files)
1.89 KB,
patch
|
bhsu
:
review+
|
Details | Diff | Splinter Review |
5.82 KB,
patch
|
bhsu
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1398484 +++ There is another bogus assertion like in bug 1398484 that assumes importScripts() cannot redirect. This is in SW update code: http://searchfox.org/mozilla-central/source/dom/workers/ServiceWorkerScriptCache.cpp#853 We should fix this and also make sure we have test coverage.
Assignee | ||
Comment 1•7 years ago
|
||
Actually, it seems we don't allow redirects in importScripts() during the update process. I think this just fell through the cracks when we added importScripts() update checking.
Summary: Fix assertion in service worker update code preventing importScripts() redirect → Fix service worker updates when importScripts() redirects
Assignee | ||
Comment 2•7 years ago
|
||
Ho-Pang, there are two fixes here: 1. We loosen the assertion like in bug 1398484. 2. We also need to remove the redirect limitation for non-main scripts.
Attachment #8908782 -
Flags: review?(bhsu)
Assignee | ||
Comment 3•7 years ago
|
||
This adds another WPT test to verify we can update a service worker when a redirected importScripts() changes. Without the P1 patch this test times out. With the P1 patch this test passes.
Attachment #8908791 -
Flags: review?(bhsu)
Assignee | ||
Comment 4•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a2c82750b237a619596d5a8f417ecd317f37bd1d
Updated•7 years ago
|
Priority: -- → P2
Comment 5•7 years ago
|
||
Comment on attachment 8908782 [details] [diff] [review] P1 Support redirected importScripts() when updating a service worker script. r=hopang Review of attachment 8908782 [details] [diff] [review]: ----------------------------------------------------------------- LGTM
Attachment #8908782 -
Flags: review?(bhsu) → review+
Comment 6•7 years ago
|
||
Comment on attachment 8908791 [details] [diff] [review] P2 Add a WPT test that verifies a redirecting importScripts() can trigger an update. r=hopang Review of attachment 8908791 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, thanks!
Attachment #8908791 -
Flags: review?(bhsu) → review+
Assignee | ||
Comment 7•7 years ago
|
||
Pulsebot is resting... remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/5fc997003df2136894c118afab0854936a54da4c remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/bb67d7dc1ff22748e0e0dc845a58f387e6f8193d
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5fc997003df2 https://hg.mozilla.org/mozilla-central/rev/bb67d7dc1ff2
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•