Page MenuHomePhabricator

Bug 1814629 - [devtools] Load target-actor-registry in the shared global but exclude browser-element targets
ClosedPublic

Authored by jdescottes on Feb 2 2023, 2:42 PM.
Referenced Files
Unknown Object (File)
Thu, May 1, 6:59 AM
Unknown Object (File)
Thu, May 1, 6:59 AM
Unknown Object (File)
Tue, Apr 29, 2:12 AM
Unknown Object (File)
Thu, Apr 17, 9:48 AM
Unknown Object (File)
Thu, Apr 17, 9:48 AM
Unknown Object (File)
Wed, Apr 16, 10:46 PM
Unknown Object (File)
Wed, Apr 16, 10:46 PM
Unknown Object (File)
Apr 9 2025, 10:20 PM
Subscribers
None

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Lint Not Applicable
Unit
Tests Not Applicable
Build Status
Buildable 506061
Build 602438: arc lint + arc unit

Event Timeline

phab-bot published this revision for review.Feb 2 2023, 2:42 PM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
devtools/server/actors/watcher.js
447

thought: I would really like to stop exposing this. If we had to give it an accurate name, it's really "getParentProcessTargetActorNotAvailableViaTargetHelpers", which is hardly a very useful API outside of the few methods in this class.

The only other call site is the parent-process storage actor/resource which uses it as follows:

const parentProcessTargetActor = this.watcherActor.getTargetActorInParentProcess();
const {
  browsingContextID,
  innerWindowId,
} = parentProcessTargetActor.form();
await this._spawnActor(browsingContextID, innerWindowId);

I think that something we quickly discussed during the review for the storage resources refactor. We can probably switch to something else here, because it's a bit artificial to get IDs for the top level target of a browser toolbox session.

459–470

question: Do you know if we have webExtensionTarget actors running in the parent process?

devtools/server/actors/watcher.js
447

About storage, yes, I think there might be way to use browsingContextID set to -1 so that ResourceCommand automagically associate the resource to the top level, parent process target.

This is being used by network event watcher only for now.

459–470

Hum... good question... you are probably right. This method is probably really only for the browser toolbox...

Somehow the webextension top target, created from the Descriptor, in the webext process via message manager is somehow managed by DevToolsFrameChild.
At least browsing-context-helpers filrting method are defined to do allow this.

This looks good, I think you could also return null for the webextension usecase.

This revision is now accepted and ready to land.Feb 7 2023, 8:02 AM