Everywhere: Make TransportSocket non-movable

Instead of wrapping all non-movable members of TransportSocket in OwnPtr
to keep it movable, make TransportSocket itself non-movable and wrap it
in OwnPtr.
This commit is contained in:
Aliaksandr Kalenik 2025-04-08 22:01:46 +02:00 committed by Alexander Kalenik
commit db8c443392
Notes: github-actions[bot] 2025-04-09 13:28:53 +00:00
42 changed files with 97 additions and 100 deletions

View file

@ -30,7 +30,7 @@ public:
String const& host() const { return m_host; }
protected:
WebUI(WebContentClient&, IPC::Transport, String host);
WebUI(WebContentClient&, NonnullOwnPtr<IPC::Transport>, String host);
using Interface = Function<void(JsonValue)>;
@ -47,17 +47,17 @@ private:
HashMap<StringView, Interface> m_interfaces;
};
#define WEB_UI(WebUIType) \
public: \
static NonnullRefPtr<WebUIType> create(WebContentClient& client, IPC::Transport transport, String host) \
{ \
return adopt_ref(*new WebUIType(client, move(transport), move(host))); \
} \
\
private: \
WebUIType(WebContentClient& client, IPC::Transport transport, String host) \
: WebView::WebUI(client, move(transport), move(host)) \
{ \
#define WEB_UI(WebUIType) \
public: \
static NonnullRefPtr<WebUIType> create(WebContentClient& client, NonnullOwnPtr<IPC::Transport> transport, String host) \
{ \
return adopt_ref(*new WebUIType(client, move(transport), move(host))); \
} \
\
private: \
WebUIType(WebContentClient& client, NonnullOwnPtr<IPC::Transport> transport, String host) \
: WebView::WebUI(client, move(transport), move(host)) \
{ \
}
}