mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibIPC+Everywhere: Always pass ownership of transferred data to clients
This has been a longstanding ergonomic issue with our IPC compiler. Non- trivial types were previously passed by const&. So if we wanted to avoid expensive copies, we would have to const_cast and move the data. We now pass ownership of all transferred data to the client subclasses. This allows us to remove const_cast from these methods, and allows us to avoid some trivial expensive copies that we didn't bother to const_cast.
This commit is contained in:
parent
0f05aac290
commit
cf69f52d53
Notes:
github-actions[bot]
2025-03-09 15:15:22 +00:00
Author: https://github.com/trflynn89
Commit: cf69f52d53
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3865
23 changed files with 395 additions and 399 deletions
|
@ -42,17 +42,17 @@ public:
|
|||
private:
|
||||
virtual void die() override;
|
||||
|
||||
virtual void request_started(i32, IPC::File const&) override;
|
||||
virtual void request_finished(i32, u64, RequestTimingInfo const&, Optional<NetworkError> const&) override;
|
||||
virtual void request_started(i32, IPC::File) override;
|
||||
virtual void request_finished(i32, u64, RequestTimingInfo, Optional<NetworkError>) override;
|
||||
virtual void certificate_requested(i32) override;
|
||||
virtual void headers_became_available(i32, HTTP::HeaderMap const&, Optional<u32> const&, Optional<String> const&) override;
|
||||
virtual void headers_became_available(i32, HTTP::HeaderMap, Optional<u32>, Optional<String>) override;
|
||||
|
||||
virtual void websocket_connected(i64 websocket_id) override;
|
||||
virtual void websocket_received(i64 websocket_id, bool, ByteBuffer const&) override;
|
||||
virtual void websocket_received(i64 websocket_id, bool, ByteBuffer) override;
|
||||
virtual void websocket_errored(i64 websocket_id, i32) override;
|
||||
virtual void websocket_closed(i64 websocket_id, u16, ByteString const&, bool) override;
|
||||
virtual void websocket_closed(i64 websocket_id, u16, ByteString, bool) override;
|
||||
virtual void websocket_ready_state_changed(i64 websocket_id, u32 ready_state) override;
|
||||
virtual void websocket_subprotocol(i64 websocket_id, ByteString const& subprotocol) override;
|
||||
virtual void websocket_subprotocol(i64 websocket_id, ByteString subprotocol) override;
|
||||
virtual void websocket_certificate_requested(i64 websocket_id) override;
|
||||
|
||||
HashMap<i32, RefPtr<Request>> m_requests;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue