Skip to content

libservo: Make Servo an opaque cloneable handle#41010

Merged
mukilan merged 1 commit intoservo:mainfrom
mukilan:servo-cloneable-handle
Dec 2, 2025
Merged

libservo: Make Servo an opaque cloneable handle#41010
mukilan merged 1 commit intoservo:mainfrom
mukilan:servo-cloneable-handle

Conversation

@mukilan
Copy link
Copy Markdown
Member

@mukilan mukilan commented Dec 2, 2025

Move the members of Servo struct to an inner structure that is wrapped in an Rc so that handle to Servo instances can be made cloneable and used from WebViews.

Testing: This preserves existing public API of the Servo struct, so should be covered by existing tests.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 2, 2025
Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with one minor change:

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Dec 2, 2025
Move the members of `Servo` struct to an inner structure that is wrapped
in an `Rc` so that handle to `Servo` instances can be made cloneable and
used from `WebView`s.

Co-authored-by: Martin Robinson <[email protected]>
Signed-off-by: Mukilan Thiyagarajan <[email protected]>
@mukilan mukilan force-pushed the servo-cloneable-handle branch from 73347ab to 9fc1df9 Compare December 2, 2025 16:06
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 2, 2025
@mukilan mukilan enabled auto-merge December 2, 2025 16:07
@mukilan mukilan added this pull request to the merge queue Dec 2, 2025
@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 Dec 2, 2025
Merged via the queue into servo:main with commit 5f44206 Dec 2, 2025
32 checks passed
@mukilan mukilan deleted the servo-cloneable-handle branch December 2, 2025 16:55
@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 Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants