mirror of
https://github.com/servo/servo
synced 2026-05-11 01:22:19 +02:00
Inspector sub-actors (walker, highlighter and page-style) had an overly complicated creation mechanism using `RefCell<Option<...>>` and instantiating these actors afterwards. Since the client always asks for the three actors and instantiating them isn't that expensive, we aren't saving anything from delaying this, and it introduces unnecessary complexity. For `*Msg`, make inspector sub-actors follow the rest and implement `ActorEncode` instead of manually creating the struct in `handle_message`. Note that this change doesn't fix the issue with navigation/reloading breaking the inspector. I am planning to send a patch for that, but it is cleaner to separate this refactor and merge it before. Testing: Manually test that the inspector still works. Signed-off-by: eri <eri@igalia.com>