Open Bug 1787445 Opened 2 years ago Updated 2 years ago

[meta] Extract DevTools network observer to a shared module

Categories

(Remote Protocol :: WebDriver BiDi, task)

task

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: meta)

We want to reuse the network observer from DevTools in WebDriver BiDi and CDP.

The first step is to extract all the related code to a shared JavaScript module (jsm or sys.mjs) that can be loaded without involving the DevTools Loader and which has no DevTools dependency.

Such work was already performed as part of the HAR prototyping effort for BiDi at https://phabricator.services.mozilla.com/D154868

As can be seen on the revision, the main modules that had to be extracted were:

The entry point from external code is normally only network-observer.js.

On top of extracting the code, we should also cleanup the interface so that methods and emitted events are not devtools specific.

Another question to answer will be the location for this module. We need to make sure the module is always included in the build whenever DevTools or RemoteAgent are built.

Blocks: 1787446
Priority: -- → P2
Whiteboard: [webdriver:backlog]
Depends on: 1788762
Depends on: 1788773
Depends on: 1788777

Note the current limitation of the DevTools network monitor, which is unable to surface chrome:// resource:// file:// and data: activity.

I imagine we are going to inherit this limitation by reusing the same code for BiDi, so we should decide what to do about it. Maybe we can prioritize it and address the root cause, so that eventually devtools could also benefit from this.

See Also: → 1000540
Keywords: meta
Summary: Extract DevTools network observer to a shared module → [meta] Extract DevTools network observer to a shared module
Priority: P2 → --
Whiteboard: [webdriver:backlog]
You need to log in before you can comment on or make changes to this bug.