Remove logic related to old service worker implementation in about:debugging
Categories
(DevTools :: about:debugging, task, P3)
Tracking
(firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
Attachments
(6 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
We have some legacy logic in DevTools in order to enable service worker debugging when parent_intercept = false but multi-e10s is disabled.
With Bug 1459953, we are removing support for this old setup, since parent_intercept is now the default since Firefox 74.
This means we can:
- update https://searchfox.org/mozilla-central/source/devtools/shared/service-workers-debug-helper.js to only check swm.isParentInterceptEnabled()
- the listener logic in the helper is also irrelevant now since the setting cannot change during runitme (we can probably remove the helper even though we need to look at backward compat issues)
- remove the code to force single e10s in about:debugging and application panel test suites:
- simplify some logic in the service worker actors around swm.isParentInterceptEnabled https://searchfox.org/mozilla-central/search?path=&q=swm.isParentInterceptEnabled
- remove browser_aboutdebugging_serviceworker_multie10s.js
And probably more...
I think we'll have to check case by case to see what can be removed and what needs to be kept, keeping in mind isParentInterceptEnabled is the default, but users might still disable it. We should remove all the workarounds and code that enabled service worker debugging without parent intercept, but we cannot assume that parent intercept is always true either. For instance if a code branch might crash with parent intercept = false and we have a guard, the guard should probably stay.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
This backward compat code can be safely removed since FF69 is out of the backward compatibility window.
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D81341
Moving forward, we do not plan to support the old service worker implementation anymore.
The only reason why we needed to update ServiceWorker UI dynamically was for the old implementation.
With the new implementation, there cannot be any change after the application starts so we don't need to react to events.
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D81342
See previous revision, same logic applies to the application panel.
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D81343
All the client side consumers for the event have been removed.
Since we don't support forward compatibility, we can simply remove the event.
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D81344
If we only care about isParentInterceptEnabled, a dedicated module should no longer be relevant.
Assignee | ||
Comment 6•4 years ago
|
||
Added patches for a first round of cleanup. This is mostly about getting rid of the can-debug-service-worker event.
We still have code on the server side that is supposed to handle the parent-intercept=false codepath.
Even though we don't support starting or debugging such workers, we need to go one step further if we want to simplify the server side code drastically.
Right now, listing service workers implies creating targets immediately. If we update the UIs to stop listing service workers when parent-intercept=false, then we can remove a lot of the server side logic around isParentInterceptEnabled.
Assignee | ||
Comment 7•4 years ago
|
||
Depends on D81346
Updated•4 years ago
|
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ab70aab1fa5c Remove backward compat code for the multi-e10s-updated event r=ladybenko https://hg.mozilla.org/integration/autoland/rev/6a8b78df0dfb Stop updating the aboutdebugging UI when multi-e10s changes r=daisuke,ladybenko https://hg.mozilla.org/integration/autoland/rev/022068148513 Stop updating the application panel when multi-e10s changes r=ladybenko https://hg.mozilla.org/integration/autoland/rev/7ac53b4678ae Remove can-debug-sw-updated event r=ladybenko,daisuke,devtools-backward-compat-reviewers https://hg.mozilla.org/integration/autoland/rev/9ab7b72ff56c Remove service-workers-debug-helper and check isParentIntercept in device actor r=ladybenko,daisuke https://hg.mozilla.org/integration/autoland/rev/b680e35199f0 Remove non-parent-intercept codepath in devtools client r=daisuke
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ab70aab1fa5c
https://hg.mozilla.org/mozilla-central/rev/6a8b78df0dfb
https://hg.mozilla.org/mozilla-central/rev/022068148513
https://hg.mozilla.org/mozilla-central/rev/7ac53b4678ae
https://hg.mozilla.org/mozilla-central/rev/9ab7b72ff56c
https://hg.mozilla.org/mozilla-central/rev/b680e35199f0
Description
•