Closed Bug 1494615 Opened 6 years ago Closed 6 years ago

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

Categories

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

enhancement

Tracking

(firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(5 files)

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
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.
Depends on D7402. Moving the module to a shared older. Following patches will cleanup the implementation to remove WebIDE couplings.
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
Depends on D7404. The install method should not hardcode "webide" for the addon manager telemetry info
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.
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.
Blocks: 1488506
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.

Attachment

General

Created:
Updated:
Size: