Closed Bug 1485671 Opened 7 years ago Closed 7 years ago

Ensure that TabClient is used for all requests made to the TargetActors

Categories

(DevTools :: Framework, enhancement, P2)

enhancement

Tracking

(firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: dt-fission)

Attachments

(2 files)

A couple of requests sent to the Target actors like FrameTargetActor, which inherit from BrowsingContextActor, are being done manually, without using TabClient. This is done by sending custom packet via `connection.send()`. Here is a list of such usages: https://searchfox.org/mozilla-central/rev/f2ac80ab7dbde5400a3400d463e07331194dec94/devtools/client/framework/toolbox.js#2270-2274 https://searchfox.org/mozilla-central/rev/f2ac80ab7dbde5400a3400d463e07331194dec94/devtools/client/framework/toolbox.js#2365-2372 https://searchfox.org/mozilla-central/rev/f2ac80ab7dbde5400a3400d463e07331194dec94/devtools/client/framework/target.js#732-739 https://searchfox.org/mozilla-central/rev/f2ac80ab7dbde5400a3400d463e07331194dec94/devtools/client/framework/target.js#754-761 There is also this one usage: https://searchfox.org/mozilla-central/rev/f2ac80ab7dbde5400a3400d463e07331194dec94/devtools/client/framework/target.js#432-441 But this one is special as we don't have any client class specific to the WebExtensionActor: https://searchfox.org/mozilla-central/source/devtools/server/actors/addon/webextension.js#93 This actor is returned by listAddons and we don't create any Client class out of it, instead we just pass around its form and uses form's metadata to display things in about:debugging UI: https://searchfox.org/mozilla-central/rev/f2ac80ab7dbde5400a3400d463e07331194dec94/devtools/client/aboutdebugging-new/src/reducers/runtime-state.js#70-91 And we pass this form to the TargetFactory.forRemoteTab as-is to create a TabTarget: https://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/modules/addon.js#59-66 Whereas we should propably instanciate a dedicated Addon/WebExtension target class.
Severity: normal → enhancement
Priority: -- → P2
Assignee: nobody → poirot.alex
Comment on attachment 9010300 [details] Bug 1485671 - Expose and use TabClient.logInPage instead of sending request manually. r=yulia Yulia Startsev [:yulia] has approved the revision.
Attachment #9010300 - Flags: review+
Comment on attachment 9010301 [details] Bug 1485671 - Expose and use TabClient.listFrames and switchToFrame. r=yulia Yulia Startsev [:yulia] has approved the revision.
Attachment #9010301 - Flags: review+
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45e8b7393aac Expose and use TabClient.logInPage instead of sending request manually. r=yulia https://hg.mozilla.org/integration/autoland/rev/ef4ee8e17d32 Expose and use TabClient.listFrames and switchToFrame. r=yulia
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Whiteboard: dt-fission
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: