mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibDevTools: Move message data into a structure
This is to prepare for an upcoming change where we will need to track replies to messages by ID. We will be able to add parameters to this structure without having to edit every single actor subclass header file.
This commit is contained in:
Notes:
github-actions[bot]
2025-03-13 20:57:59 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/24a5e4e7d57 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3920
@@ -22,11 +22,11 @@ ThreadConfigurationActor::ThreadConfigurationActor(DevToolsServer& devtools, Str
|
||||
|
||||
ThreadConfigurationActor::~ThreadConfigurationActor() = default;
|
||||
|
||||
void ThreadConfigurationActor::handle_message(StringView type, JsonObject const& message)
|
||||
void ThreadConfigurationActor::handle_message(Message const& message)
|
||||
{
|
||||
JsonObject response;
|
||||
|
||||
if (type == "updateConfiguration"sv) {
|
||||
if (message.type == "updateConfiguration"sv) {
|
||||
auto configuration = get_required_parameter<JsonObject>(message, "configuration"sv);
|
||||
if (!configuration.has_value())
|
||||
return;
|
||||
@@ -35,7 +35,7 @@ void ThreadConfigurationActor::handle_message(StringView type, JsonObject const&
|
||||
return;
|
||||
}
|
||||
|
||||
send_unrecognized_packet_type_error(type);
|
||||
send_unrecognized_packet_type_error(message);
|
||||
}
|
||||
|
||||
JsonObject ThreadConfigurationActor::serialize_configuration() const
|
||||
|
||||
Reference in New Issue
Block a user