Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the Kotlin FFIObject base class. #1942

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

mhammond
Copy link
Member

Each interface now includes the functionality directly in the implementation.

This is towards supporting interfaces as errors; such interfaces will need to derive from Exception and Kotlin/Java don't allow multiple base-classes.

@mhammond mhammond requested a review from a team as a code owner January 14, 2024 20:01
@mhammond mhammond requested review from badboy and bendk and removed request for a team January 14, 2024 20:01
@mhammond mhammond force-pushed the kill-ffi-object branch 2 times, most recently from cf7e51c to 34a3789 Compare January 15, 2024 01:42
Copy link
Contributor

@bendk bendk 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, other than the documentation nit.

This feels slightly risky to me when we're about to release 0.26. Maybe we should wait to merge until after?

// struct after it has been dropped, and because we must expose a public API for freeing
// the Kotlin wrapper object in lieu of reliable finalizers. The core requirements are:
//
// * Each `FFIObject` instance holds an opaque pointer to the underlying Rust struct.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: FFIObject no longer exists. Maybe this could just say "instance".

@mhammond mhammond force-pushed the kill-ffi-object branch 2 times, most recently from 78677e4 to f53533a Compare January 24, 2024 02:26
Each interface now includes the functionality directly in the
implementation.

This is towards supporting interfaces as errors; such interfaces will
need to derive from `Exception` and Kotlin/Java don't allow
multiple base-classes.
@mhammond mhammond merged commit 848f63b into mozilla:main Jan 24, 2024
5 checks passed
@mhammond mhammond deleted the kill-ffi-object branch January 24, 2024 03:10
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.

2 participants