LibDevTools: Send an unknown actor error for failed DOM node lookups

DevTools will ask us to find nodes by their actor names. If the actor is
missing, we should inform DevTools of the error instead of just dropping
the request.

The diff here is a bit noisy, just due to a leftward shift of code that
used to be in an if-statement.
This commit is contained in:
Timothy Flynn 2025-03-11 07:55:05 -04:00 committed by Tim Flynn
commit a7b577126a
Notes: github-actions[bot] 2025-03-12 16:49:17 +00:00
3 changed files with 270 additions and 209 deletions

View file

@ -96,8 +96,10 @@ template<typename Callback>
void PageStyleActor::inspect_dom_node(StringView node_actor, Callback&& callback)
{
auto dom_node = WalkerActor::dom_node_for(InspectorActor::walker_for(m_inspector), node_actor);
if (!dom_node.has_value())
if (!dom_node.has_value()) {
send_unknown_actor_error(node_actor);
return;
}
auto block_token = block_responses();