Closed Bug 1173389 Opened 4 years ago Closed 4 years ago

Add a pref to disable fetch events in case we want to ship service workers for push first

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: ehsan, Assigned: nsm)

References

Details

Attachments

(1 file)

This should hide self.onfetch, and prevent network interception.
Can we wait to do this until we are more sure that network interception will slip?
I'm in no rush!
There is one new test for feature detection, the rest of the test changes are just adding the pref.
Comment on attachment 8621906 [details]
MozReview Request: Bug 1173389 - Disable ServiceWorker network interception by default. r?ehsan

https://reviewboard.mozilla.org/r/11079/#review9755

Ship It!

::: dom/workers/test/serviceworkers/test_claim_oninstall.html:67
(Diff revision 1)
> +    ["dom.serviceWorkers.interception.enabled", true],

Please remove the second line.

::: dom/workers/test/serviceworkers/test_fetch_event.html:76
(Diff revision 1)
> +    ["dom.serviceWorkers.interception.enabled", true],

Ditto.

::: dom/workers/test/serviceworkers/test_interception_featuredetect.html:27
(Diff revision 1)
> +      }, function(e) {

Nit: Use .catch() ;-)

::: dom/workers/test/serviceworkers/test_interception_featuredetect.html:65
(Diff revision 1)
> +    ["dom.messageChannel.enabled", true],

Why do you need to enable MessageChannel?  I think this can be removed.

::: dom/workers/test/serviceworkers/test_interception_featuredetect.html:54
(Diff revision 1)
> +      .then(function() {

Please unregister the service worker before the end of the test.

::: dom/workers/test/serviceworkers/test_match_all_client_properties.html:92
(Diff revision 1)
> +    ["dom.serviceWorkers.interception.enabled", true],

Unneeded repetition.

::: dom/workers/test/serviceworkers/test_sanitize_domain.html:82
(Diff revision 1)
> +    ["dom.serviceWorkers.interception.enabled", true],

Same.
Attachment #8621906 - Flags: review?(ehsan) → review+
BTW, I think you'd need to add these prefs to WPT tests as well.  r=me with that.
And you should add these prefs to firefox.js and mobile.js under the same RELEASE_BUILDS conditions as dom.serviceWorkers.enabled.
https://hg.mozilla.org/mozilla-central/rev/02f640a72dcd
Assignee: nobody → nsm.nikhil
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.