You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CoreCLR] Code cleanup and filling-in gaps (#10148)
This commit performs a comprehensive code cleanup by converting function
parameter types and log messages to use `std::string_view` literal (`sv`)
syntax and by removing unused or redundant parameters.
`std::string_view` is used to avoid potential conversions between `char*`
and `char[]` code and make it faster, at points.
It also implements a handful of `p/invokes` which haven't had implementation
so far. One notable exception here is `_monodroid_gref_log_delete` which, when
enabled, causes a managed exception towards the end of `Mono.Android_Tests`
run:
FATAL EXCEPTION: Instr: xamarin.android.runtimetests.NUnitInstrumentation
Process: Mono.Android.NET_Tests, PID: 16194
android.runtime.JavaProxyThrowable: [System.ObjectDisposedException]: Cannot access disposed object with JniIdentityHashCode=166175665.
Object name: 'Xamarin.Android.RuntimeTests.NUnitInstrumentation'.
at Java.Interop.JniPeerMembers.AssertSelf + 0x2f(Unknown Source)
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod + 0x1(Unknown Source)
at Android.App.Instrumentation.Finish + 0x46(Unknown Source)
at Xamarin.Android.UnitTests.TestInstrumentation`1.OnStart + 0x6d(Unknown Source)
at Android.App.Instrumentation.n_OnStart + 0x1f(Unknown Source)
at crc643df67da7b13bb6b1.TestInstrumentation_1.n_onStart(Native Method)
at crc643df67da7b13bb6b1.TestInstrumentation_1.onStart(TestInstrumentation_1.java:32)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2606)
The above issue likely stems from the imbalance in calls to `_monodroid_gref_log_new` and
`_monodroid_gref_log_delete` in `Mono.Android.dll` or `Java.Interop.dll`. It will be
investigated and fixed in a separate PR.
Key changes include:
* Updating function signatures to replace `const char*` with `std::string_view`
and removal of unused parameters.
* Converting logging format strings throughout the codebase to use the new sv literal.
* Minor refactoring in host and assembly-related source files to improve code consistency.
* Add implementation of a handful of missing internal `p/invokes`
0 commit comments