Skip to content

Commit 19b4fed

Browse files
committed
Enable ManagedTypeManager
1 parent ec437e4 commit 19b4fed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Microsoft.Android.Runtime.NativeAOT/Android.Runtime.NativeAOT/JavaInteropRuntime.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ static void init (IntPtr jnienv, IntPtr klass, IntPtr classLoader)
4545
var settings = new DiagnosticSettings ();
4646
settings.AddDebugDotnetLog ();
4747

48-
var typeManager = new ManagedTypeManager ();
4948
var options = new NativeAotRuntimeOptions {
5049
EnvironmentPointer = jnienv,
51-
ClassLoader = new JniObjectReference (classLoader),
52-
TypeManager = typeManager,
53-
ValueManager = new SimpleValueManager (),
50+
ClassLoader = new JniObjectReference (classLoader, JniObjectReferenceType.Global),
51+
TypeManager = new ManagedTypeManager (),
52+
ValueManager = ManagedValueManager.GetOrCreateInstance (),
5453
UseMarshalMemberBuilder = false,
5554
JniGlobalReferenceLogWriter = settings.GrefLog,
5655
JniLocalReferenceLogWriter = settings.LrefLog,

src/native/clr/host/internal-pinvokes-shared.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ BridgeProcessingFtn clr_initialize_gc_bridge (
3333
BridgeProcessingStartedFtn bridge_processing_started_callback,
3434
BridgeProcessingFinishedFtn bridge_processing_finished_callback) noexcept
3535
{
36+
log_warn (LOG_ASSEMBLY, "{}", __PRETTY_FUNCTION__);
3637
return GCBridge::initialize_callback (bridge_processing_started_callback, bridge_processing_finished_callback);
3738
}
3839

0 commit comments

Comments
 (0)