[remote-dbg-next] Create a shared helper to manage the ADB extension

RESOLVED FIXED in Firefox 64

Status

enhancement
P1
normal
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: jdescottes, Assigned: jdescottes)

Tracking

unspecified
Firefox 64
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(5 attachments)

Assignee

Description

8 months ago
Follow up to Bug 1492374

Both WebIDE and about:debugging need to interact with the adb extension:
- check if the extension is installed
- install the extension 
- uninstall the extension

We currently have an addons.js module in WebIDE that does some of that but which is very tied to WebIDE logic. The goal of this bug is to refactor this module into something that can be shared by both about:debugging and webide. The new location for this module should probably be under devtools/shared/adb
Assignee

Comment 1

8 months ago
There is only one addon to manage in WebIDe, removing the concept
of available addons will make it easier to move the ADBAddon module to a 
shared folder.
Assignee

Comment 2

8 months ago
Depends on D7402. Moving the module to a shared older. Following
patches will cleanup the implementation to remove WebIDE couplings.
Assignee

Comment 3

8 months ago
Depends on D7403
The getADBAddon/forgetADBAddon is not removing listeners or doing 
anything useful since the next call to getADBADdon will just recreate an
instance of ADBAddon. We can expose a singleton and use lazy requires to
achieve the same effect
Assignee

Comment 4

8 months ago
Depends on D7404. The install method should not hardcode "webide"
for the addon manager telemetry info
Assignee

Comment 5

8 months ago
Depends on D7405. The adb-addon module fires events whenever the
addon state changes, so Devices.jsm should be able to simply reuse this 
module to update its internal state, rather than having adb-addon set 
something on Devices.jsm directly.

On a sidenote, we really should not propagate the adb status via Devices.jsm
but since WebIDE relies on this, I decided to keep the code as is for now.
We will remove it from Devices.jsm when WebIDE is removed.
Assignee

Comment 6

8 months ago
I have another patch to cleanup the current adb-addon module a bit more, and I would also like to add a dedicated xpc-shell test, but I think this can go in a separate bug.
Assignee

Updated

8 months ago
Blocks: 1488506

Comment 7

8 months ago
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/274c5774f6fb
Remove concept of availableAddons in WebIDE;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/3d5b641b9783
Move ADBAddon module to devtools/shared/adb;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/0869291895c4
Update adb-addon module to expose a singleton;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/aeb01a4cf668
Accept source parameter in adb-addon install();r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/dfab24784096
Stop update Devices.jsm from adb-addon module;r=ladybenko
You need to log in before you can comment on or make changes to this bug.