Closed
Bug 1325101
Opened 8 years ago
Closed 8 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)
(deleted),
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
(deleted),
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•8 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•8 years ago
|
||
Somehow, I removed the if('fetch') line when changing from throwing to warning.
Attachment #8820811 -
Flags: review?(bkelly)
Assignee | ||
Comment 3•8 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•8 years ago
|
||
I'll review this afternoon, but can you also update one of the automated test cases to catch this?
Assignee | ||
Comment 5•8 years ago
|
||
Attachment #8820818 -
Flags: review?(bkelly)
Reporter | ||
Updated•8 years ago
|
Attachment #8820811 -
Flags: review?(bkelly) → review+
Reporter | ||
Comment 6•8 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•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 7•8 years ago
|
||
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•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fa14643296e8
https://hg.mozilla.org/mozilla-central/rev/38f5c47acbe1
Status: NEW → RESOLVED
Closed: 8 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
•