mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 06:52:52 +00:00
LibCore+Userland+Tests: Convert Stream APIs to construct on heap
As per previous discussion, it was decided that the Stream classes should be constructed on the heap. While I don't personally agree with this change, it does have the benefit of avoiding Function object reconstructions due to the lambda passed to Notifier pointing to a stale object reference. This also has the benefit of not having to "box" objects for virtual usage, as the objects come pre-boxed. However, it means that we now hit the heap everytime we construct a TCPSocket for instance, which might not be desirable.
This commit is contained in:
parent
eb389db92c
commit
dbd25916a3
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/sin-ack
Commit: dbd25916a3
Pull-request: https://github.com/SerenityOS/serenity/pull/11292
Reviewed-by: https://github.com/creator1creeper1 ✅
14 changed files with 163 additions and 162 deletions
|
@ -85,7 +85,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}
|
||||
|
||||
// FIXME: Propagate errors
|
||||
MUST(maybe_buffered_socket.value().set_blocking(true));
|
||||
MUST(maybe_buffered_socket.value()->set_blocking(true));
|
||||
auto client = WebServer::Client::construct(maybe_buffered_socket.release_value(), server);
|
||||
client->start();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue