summaryrefslogtreecommitdiff
path: root/lang/mono/patches/patch-as
blob: 46392659f68a18bd0dbbd9ea6a9f7b2bd62eb70b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-as,v 1.2 2013/05/29 11:11:12 wiz Exp $

From FreeBSD: https://bugzilla.novell.com/show_bug.cgi?id=528830

--- mono/metadata/appdomain.c.orig	2012-12-05 17:44:33.000000000 +0000
+++ mono/metadata/appdomain.c
@@ -2452,6 +2452,11 @@ mono_domain_try_unload (MonoDomain *doma
 			/* The icall wrapper will execute the abort */
 			CloseHandle (thread_handle);
 			return;
+		} else if (!mono_thread_has_appdomain_ref (mono_thread_current (), domain) && !(mono_thread_interruption_requested ())) {
+			if (!domain->friendly_name) {
+				CloseHandle (thread_handle);
+				return;
+			}
 		}
 	}
 	CloseHandle (thread_handle);