devtools: Rename WorkerActor variables and add register method#43963
Merged
Conversation
mukilan
reviewed
Apr 6, 2026
| worker_id, | ||
| url, | ||
| type_: worker_type, | ||
| script_chan: script_sender, |
Member
There was a problem hiding this comment.
We can rename the script_chan field in WorkerActor to script_sender in this PR to be consistent with other actors.
mukilan
requested changes
Apr 6, 2026
mukilan
left a comment
Member
There was a problem hiding this comment.
Thanks, the PR looks good and can land as it is. I've just mentioned an additional cleanup that I think makes sense to do in this PR.
bb102c4 to
92bdd4e
Compare
92bdd4e to
0e39e47
Compare
Renames local variable `worker` to `worker_actor` in lib.rs and
root.rs, following the `{}_actor` convention for actor struct
variables and `{}_name` for actor name string variables.
Also adds a `WorkerActor::register()` method (part of servo#43800),
replacing the inline struct construction in lib.rs with a
consistent pattern matching other actors like ThreadActor and
SourceActor.
Fixes: Part of servo#43606
Fixes: Part of servo#43800
Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
0e39e47 to
0a5c003
Compare
mukilan
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames local variable
workertoworker_actorinlib.rsandroot.rs, following the{}_actorconvention for actor struct variables and{}_namefor actor name string variables established in #43606.Also adds a
WorkerActor::register()method (part of #43800), replacing the inline struct construction inlib.rswith a consistent pattern pattern matching other actors likeThreadActorandSourceActor.Changes:
actors/worker.rs: AddWorkerActor::register()methodactors/root.rs: Renameworker→worker_actorinlistServiceWorkerRegistrationshandlerlib.rs: Replace inline struct construction withWorkerActor::register()callTesting: No testing required, compiles successfully.
Fixes: Part of #43606
Fixes: Part of #43800