E598 [nativeaot] Implement _monodroid_weak_gref_delete (#10504) · dotnet/android@7ed894b · GitHub
[go: up one dir, main page]

Skip to content

Commit 7ed894b

Browse files
authored
[nativeaot] Implement _monodroid_weak_gref_delete (#10504)
Context: #10496 (comment) Context: 869b0e0 The `_monodroid_weak_gref_delete` p/invoke wasn't implemented in 869b0e0 as it was thought to be unused. However, the test failure in #10496 shows that it's not true. Bring the `_monodroid_weak_gref_delete` implementation to NativeAOT host from the CoreCLR host.
1 parent fd2286c commit 7ed894b

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ void monodroid_timing_stop (managed_timing_sequence *sequence, const char *messa
6666
timing->release_sequence (sequence);
6767
}
6868

69-
void _monodroid_weak_gref_delete (jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
70-
{
71-
OSBridge::_monodroid_weak_gref_delete (handle, type, threadName, threadId, from, from_writable);
72-
}
73-
7469
void* _monodroid_timezone_get_default_id ()
7570
{
7671
JNIEnv *env = OSBridge::ensure_jnienv ();

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ void _monodroid_gref_log_delete (jobject handle, char type, const char *threadNa
2929
OSBridge::_monodroid_gref_log_delete (handle, type, threadName, threadId, from, from_writable);
3030
}
3131

32+
void _monodroid_weak_gref_delete (jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
33+
{
34+
OSBridge::_monodroid_weak_gref_delete (handle, type, threadName, threadId, from, from_writable);
35+
}
36+
3237
BridgeProcessingFtn clr_initialize_gc_bridge (
3338
BridgeProcessingStartedFtn bridge_processing_started_callback,
3439
BridgeProcessingFinishedFtn bridge_processing_finished_callback) noexcept

src/native/nativeaot/host/internal-pinvoke-stubs.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,6 @@ void monodroid_timing_stop (
5656
pinvoke_unreachable ();
5757
}
5858

59-
void _monodroid_weak_gref_delete (
60-
[[maybe_unused]] jobject handle,
61-
[[maybe_unused]] char type,
62-
[[maybe_unused]] const char *threadName,
63-
[[maybe_unused]] int threadId,
64-
[[maybe_unused]] const char *from,
65-
[[maybe_unused]] int from_writable)
66-
{
67-
pinvoke_unreachable ();
68-
}
69-
7059
void* _monodroid_timezone_get_default_id ()
7160
{
7261
pinvoke_unreachable ();

0 commit comments

Comments
 (0)
0