Closed Bug 1531349 Opened 5 years ago Closed 5 years ago

Rename multi-e10s-helper.js into can-debug-service-workers.js

Categories

(DevTools :: about:debugging, enhancement, P3)

enhancement

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: sole, Assigned: jdescottes)

Details

User Story

As mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1522511#c4 we'd like to improve code readability and avoid leaking implementation details.

Having mentions to `isMultiE10s` everywhere when what we care about is whether we can debug service workers is not very good. 

One way of addressing this situation could be:

* rename the helper file: `hg mv devtools/shared/multi-e10s-helper.js devtools/shared/can-debug-service-workers.js`
* rename the `isMultiE10s` function `canDebugServiceWorkers`
* rename the listener names:
  * `addMultiE10sListener` to `addCanDebugServiceWorkersListener`
  * `removeMultiE10sListener` to `removeCanDebugServiceWorkersListener`
* update all consumers of the function and the listeners: Example [rough search](https://searchfox.org/mozilla-central/search?q=isMultiE10s&path) for appearances of the function (bear in mind not all search results are actual usages)
  * update the import: ```require("devtools/shared/can-debug-service-workers");``` instead of ```require("devtools/shared/multi-e10s-helper");```
  * update the logic: the refactor makes it return the boolean opposite of what it was returning before


The pending question is what to do re backwards compatibility, as the server will return a isMultiE10s field. If we update this, newer versions of about:debugging will have issues connecting to older servers.

I'll needinfo Julian & Belen as requested so they think about this.

I hope this captures the discussion we had off-bugzilla!

Attachments

(1 file)

No description provided.

Needinfoing you as requested :)

Flags: needinfo?(jdescottes)
Flags: needinfo?(balbeza)
Flags: needinfo?(jdescottes)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Flags: needinfo?(balbeza)
Priority: -- → P3
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/925a15d158fd
Rename multi-e10s-helper to service-workers-debug-helper r=ladybenko,yulia
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: