Skip to content

Conversation

jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Feb 3, 2025

Context: dbb0b92
Context: dotnet/java-interop@dd3c1d0

Commit dbb0b92 had to copy significant parts of
JniRuntime.JniValueManager.CreatePeer() in order to get the desired semantics. dotnet/java-interop@dd3c1d05 added a TryCreatePeer() virtual method in an effort to reduce the amount of copied code required.

Update NativeAotValueManager to override the new method, allowing us to remove most of the CreatePeer() code added in dbb0b92. Additionally, override GetInvokerTypeCOre() within NativeAotTypeManager so that .NET for Android -style Invoker types can be appropriately resolved.

Context: dbb0b92
Context: dotnet/java-interop@dd3c1d0

Commit dbb0b92 had to copy significant parts of
`JniRuntime.JniValueManager.CreatePeer()` in order to get the
desired semantics.  dotnet/java-interop@dd3c1d05 added a
`TryCreatePeer()` virtual method in an effort to reduce the
amount of copied code required.

Update `NativeAotValueManager` to override the new method, allowing
us to remove most of the `CreatePeer()` code added in dbb0b92.
Additionally, override `GetInvokerTypeCOre()` within
`NativeAotTypeManager` so that .NET for Android -style
`Invoker` types can be appropriately resolved.
@jonpryor jonpryor merged commit 70a4f93 into main Feb 4, 2025
58 checks passed
@jonpryor jonpryor deleted the dev/jonp/jonp-nativeaot-trycreatepeer branch February 4, 2025 02:18
grendello added a commit that referenced this pull request Feb 4, 2025
* main:
  [NativeAOT] Integrate TryCreatePeer (#9746)
  Bump to dotnet/java-interop@dd3c1d05 (#9745)
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant