Expose an observer notification when a data channel is created in the content process
Categories
(Core :: DOM: Networking, task, P3)
Tracking
()
People
(Reporter: Sasha, Unassigned)
References
(Blocks 6 open bugs)
Details
(Whiteboard: [necko-triaged][necko-priority-next])
While adding support for data URLs in the scope of bug 1805176, we've noticed that in the cases when data URLs requested in the content process (e.g. data URL as src for images on the page, as background images or in fetch requests inside the page) the data-channel-opened
notification is sent only in the content process, where at the moment we listen to all the network related notifications in the parent process.
There are two solutions here:
- the notification is propagated to parent process on the platform side;
- we set up an observer in the content process on WebDriver BiDi and DevTools side.
Reporter | ||
Comment 1•11 days ago
|
||
Moving the comment from the discussion on the bug 1805176:
(In reply to Kershaw Chang [:kershaw] from comment #18)
(In reply to Alexandra Borovova [:Sasha] from comment #13)
Hi Valentin,
I have another question. :)
I've noticed that in some case (e.g. data URL as src for images on the page, as background images or in fetch requests inside the page) thedata-channel-opened
notification is sent only in the content process, where at the moment we listen to all the network related notifications in the parent process. Is it maybe possible to bubble them up?Thank you in advance
Yeah, I think that's possible, but it requires some amount of work.
I assume we need to forward the data URL to parent process and open it again.
Comment 2•11 days ago
|
||
Just want to reiterate what Sasha mentioned in the description: we can also observe the notifications in content processes if needed. It's a bit more plumbing work to do on our side, but it's feasible. So if it is problematic for necko to bubble those notifications from content to parent (for performance reasons or others), that is still an option here.
Updated•6 days ago
|
Comment 3•5 days ago
|
||
For every DataChannel
created in content proces, we create a DataChannelChild
here, which means there is also a DataChannelParent
created in parent process.
I think we can reuse PDataChannel
to forward the notification.
Description
•