Files
servo/components/shared/base
Narfinger 5aed3ab517 net: Implement LazyGenericCallback and use it in websocket (#42077)
We introduce a new type of callback, LazyGenericCallback and use it in
websocket initialization.

The basic requirement is that for websocket the place where the callback
is called and where it is constructed are over several functions,
including async functions. To make this generic, we implement
LazyGenericCallback and a GeneralCallbackSetter. The CallbackSetter can
be used to set the callback which then will be transfered to the
LazyGenericCallback which calls it on messages send to it.

Finally, we use this to "Generify" the initialization of WebSockets.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>

Testing: We have new tests for LazyGenericCallback and wpt test run
here: https://github.com/Narfinger/servo/actions/runs/21246091767

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
2026-03-04 13:37:33 +00:00
..
2026-03-01 14:15:27 +00:00
2026-02-09 17:25:53 +00:00