WebSocketEventService does not listen for events from Iframes
Categories
(Core :: Networking: WebSockets, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: bomsy, Assigned: bomsy)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
The WebSocketEventService does not seem to listen for events from child remote iframes. This blocks the fission work for websockets in Bug 1644196
STR
- Go to http://techno-barje.fr/fission/websockets/
- Open devtools and go to the netmonitor
- Make sure all fission flags are on i.e
fission.autostart
&devtools.browsertoolbox.fission
- Click "Connect" to connect to the websocket at "wss://echo.websocket.org" (which is already set) in the iframe page
- Select the newly added websockect request in the netmonitor
- Go to the response side panel
- On the iframed page click "send" to send some messages
ER
See websocket messages in the response sidepanel.
AR
No message are shown in the response sidepanel
Assignee | ||
Comment 1•4 years ago
|
||
The websocket uses the innerWindowId of the window where the script lives when
triggering events for devtools. This is may not be the same as the websocket
owner window as mentioned here https://searchfox.org/mozilla-central/rev/f1159268add2fd0959e9f91b474f5da74c90f305/dom/websocket/WebSocket.cpp#206-207,212
This seems to be the case when we have iframes within a page. The devtools
do not get the events for the websockets channels opened within iframes as
the innerWindowId is that of the top-level window.
...->TopWindowContext()->InnerWindowId()
also always point to the top-level window.
This patch fixes these issues by switching to use the websocket owner window which
the iframe.
Note: The parent revsion contains the changes for the devtools fission work that
depends on this fix. i did this to make it easy to test and review.
Depends on D103847
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
bugherder |
Description
•