Closed
Bug 1325101
Opened 7 years ago
Closed 7 years ago
service worker no-fetch optimization doesn't seem to work
Categories
(Core :: DOM: Service Workers, defect)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: bkelly, Assigned: catalinb)
References
Details
Attachments
(2 files)
1.39 KB,
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
1.97 KB,
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
I tried testing the latest nightly on some sites I know only use push notifications. AFAICT, the service worker is still starting up. For example, try this site: https://gauntface.github.io/simple-push-demo/ I opened up the serviceworkers.txt file to see if I was running the version with the new info and it appears I am: https://gauntface.github.io/simple-push-demo/ https://gauntface.github.io/simple-push-demo/service-worker.js true {3280b85a-c2ae-4f7f-b005-abd4fe3ca9d2} We're just selecting true for the fetch handler boolean for some reason. Catalin, can you take a look?
Flags: needinfo?(catalin.badea392)
Reporter | ||
Comment 1•7 years ago
|
||
It seems we should only do this for `addEventListener('fetch')`: https://dxr.mozilla.org/mozilla-central/source/dom/workers/WorkerScope.cpp#693 I think right now we set the flag if there are any event handlers. Sorry I missed this in review!
Assignee | ||
Comment 2•7 years ago
|
||
Somehow, I removed the if('fetch') line when changing from throwing to warning.
Attachment #8820811 -
Flags: review?(bkelly)
Assignee | ||
Comment 3•7 years ago
|
||
Tested on https://gauntface.github.io/simple-push-demo/, the patch fixes the issue.
Assignee: nobody → catalin.badea392
Flags: needinfo?(catalin.badea392)
Reporter | ||
Comment 4•7 years ago
|
||
I'll review this afternoon, but can you also update one of the automated test cases to catch this?
Assignee | ||
Comment 5•7 years ago
|
||
Attachment #8820818 -
Flags: review?(bkelly)
Reporter | ||
Updated•7 years ago
|
Attachment #8820811 -
Flags: review?(bkelly) → review+
Reporter | ||
Comment 6•7 years ago
|
||
Comment on attachment 8820818 [details] [diff] [review] Update nofetch handler mochitest. Review of attachment 8820818 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8820818 -
Flags: review?(bkelly) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 7•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1c5a624e9225650eb52658ea4e3bcae4de3cbe0d
Pushed by ihsiao@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/fa14643296e8 Don't set fetch handler flag for events other than 'fetch'. r=bkelly https://hg.mozilla.org/integration/mozilla-inbound/rev/38f5c47acbe1 Update nofetch handler mochitest. r=bkelly
Keywords: checkin-needed
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fa14643296e8 https://hg.mozilla.org/mozilla-central/rev/38f5c47acbe1
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•