mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibCore: Convert CTCPSocket to ObjectPtr, add construct() helper
The C_OBJECT macro now also inserts a static construct(...) helper into the class. Now we can make the constructor(s) private and instead call: auto socket = CTCPSocket::construct(arguments); construct() returns an ObjectPtr<T>, which we'll later switch to being a NonnullRefPtr<T>, once everything else in in place for ref-counting.
This commit is contained in:
parent
1f5a9762a2
commit
4298ba25c3
Notes:
sideshowbarker
2024-07-19 12:02:41 +09:00
Author: https://github.com/awesomekling
Commit: 4298ba25c3
15 changed files with 30 additions and 25 deletions
|
@ -26,7 +26,7 @@ private:
|
|||
};
|
||||
|
||||
CHttpRequest m_request;
|
||||
CTCPSocket* m_socket { nullptr };
|
||||
ObjectPtr<CTCPSocket> m_socket;
|
||||
State m_state { State::InStatus };
|
||||
int m_code { -1 };
|
||||
HashMap<String, String> m_headers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue