Skip to content

devtools: Implement ActorEncode and clean inspector sub-actors#41685

Merged
jdm merged 1 commit intoservo:mainfrom
eerii:clean-inspector-actors
Jan 5, 2026
Merged

devtools: Implement ActorEncode and clean inspector sub-actors#41685
jdm merged 1 commit intoservo:mainfrom
eerii:clean-inspector-actors

Conversation

@eerii
Copy link
Copy Markdown
Member

@eerii eerii commented Jan 5, 2026

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.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 5, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 5, 2026
@jdm jdm added this pull request to the merge queue Jan 5, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 5, 2026
Merged via the queue into servo:main with commit 7528d05 Jan 5, 2026
32 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 5, 2026
@eerii eerii deleted the clean-inspector-actors branch January 5, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants