mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
For example, consider the following IPC message: do_something(u64 page_id, String string, Vector<Data> data) =| We would previously generate the following C++ method to encode/transfer this message: void do_something(u64 page_id, String string, Vector<Data> data); This required the caller to either have to copy the non-trivial types or `move` them in. In some places, this meant we had to construct temporary vectors just to send an IPC. This isn't necessary because we weren't holding onto these parameters anyways. We would construct an IPC::Message subclass with them (which does require owning types), but then immediate encode the message to an IPC::MessageBuffer and send it. We now generate code such that we don't need to construct a Message. We can simply encode the parameters directly without needing ownership. This allows us to take view-types to IPC parameters. So the above example now becomes: void do_something(u64, StringView, ReadonlySpan<Data>); |
||
---|---|---|
.. | ||
Android | ||
AppKit | ||
cmake | ||
Headless | ||
Icons | ||
Qt | ||
.gitignore | ||
CMakeLists.txt | ||
DefaultSettings.h | ||
Info.plist |