Open Bug 1805478 Opened 2 years ago Updated 2 years ago

Add timeOrigin to FetchTimingInfo for BiDi Network events

Categories

(Remote Protocol :: WebDriver BiDi, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [webdriver:backlog])

Added to Network module spec PR in https://github.com/w3c/webdriver-bidi/commit/6ac312a988b7a3100ca7b6c5f954c3a46dde0b5a

This corresponds to the Performance API timeOrigin. All the other timings in fetchTimingInfo are relative to the global's timeOrigin, so adding this information allows the consumer to convert the timings back to regular timestamps.

In terms of implementation, currently this information is only accessible in the content process, even though it seems to be computed initially in the parent process: https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/netwerk/ipc/DocumentLoadListener.cpp#983

Option 1 is to expose it in the parent process, for instance on WindowGlobalParent.
Option 2 is to handle this on BiDi side. We could setup listeners for each window global to notify the parent process about the time origin for each and every innerWindowId, which can then be cached in the parent and used when we generate the network events.

Or we can also go back to the specification and allow differnt time origins. Some implementations could choose to use performance's time origin, others could use the beginning of the Unix epoch...

Priority: -- → P3
Whiteboard: [webdriver:backlog]
You need to log in before you can comment on or make changes to this bug.