Closed
Bug 1452244
Opened 6 years ago
Closed 6 years ago
don't write broken waiting worker records to serviceworker.txt
Categories
(Core :: DOM: Service Workers, enhancement, P2)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: bkelly, Assigned: bkelly)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
9.34 KB,
patch
|
asuth
:
review+
|
Details | Diff | Splinter Review |
Currently we call StoreRegistration() in ServiceWorkerRegistrationInfo::TransitionInstallingToWaiting(). This is in anticipation of actually implementating bug 1426401. Until we implement that bug, though, calling StoreRegistration() is just a waste of resources. The entries it produces are not correct and won't result anything being usefully read.
Assignee | ||
Comment 1•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3462dd8679adc5ea41456cc05f199fd9f30b0bc2
Assignee | ||
Comment 2•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=53b14b926bf0dfc3f920e8d9792916541e4f4a10
Attachment #8965850 -
Attachment is obsolete: true
Assignee | ||
Comment 3•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bc3702636b75e5d7439531cf0319371ebcb0bea6
Assignee | ||
Comment 4•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7a900f398f81e4104e24b507d273a13645e2090a
Attachment #8965960 -
Attachment is obsolete: true
Assignee | ||
Comment 5•6 years ago
|
||
Comment on attachment 8966213 [details] [diff] [review] Avoid empty entries in serviceworker.txt. r=asuth Andrew, I realized recently that we are stacking up a lot of service worker changes at once. Each one tries to trigger its own write to the serviceworker.txt file. This is probably exacerbating write failures on windows. This patch is a first step to trying to calm the situation down. Currently we try to write out some entries that can't be useful read in yet. In particular: 1. We are writing out when installing transitions to waiting. We haven't implemented bug 1426401, though, so we don't really handle this case yet and the entry in the file doesn't have a script URL. 2. When we resurrect a service worker we write out the file again to reflect that the registration is back. We don't check to see if we are resurrecting a registration with an active worker, though. In theory it could just have an installing/waiting worker. This patch tries to close these loop holes and add some debug-only assertions. I also added some read/write validation code as a safe guard to avoid actually writing this stuff to disk and to immediately ignore it if its read.
Attachment #8966213 -
Flags: review?(bugmail)
Assignee | ||
Comment 6•6 years ago
|
||
Stacking up a lot of writes is bad because of the overlapping runnables on STS. See bug 1452373.
See Also: → 1452373
Updated•6 years ago
|
Priority: -- → P2
Comment 7•6 years ago
|
||
Comment on attachment 8966213 [details] [diff] [review] Avoid empty entries in serviceworker.txt. r=asuth Review of attachment 8966213 [details] [diff] [review]: ----------------------------------------------------------------- Great cleanup, and great catch on the STS snafu in bug 1452373... I feel like anytime DOM code uses it without a TaskQueue we're usually mis-using...
Attachment #8966213 -
Flags: review?(bugmail) → review+
Pushed by bkelly@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c913924064a5 Avoid empty entries in serviceworker.txt. r=asuth
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c913924064a5
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•