2003-11-01 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Sat, 1 Nov 2003 18:15:18 +0000 (18:15 -0000)
committerZoltan Varga <vargaz@gmail.com>
Sat, 1 Nov 2003 18:15:18 +0000 (18:15 -0000)
* RemotingServices.cs (GetDomainProxy): Use the new InvokeInDomain
function instead of calling SetDomain.

svn path=/trunk/mcs/; revision=19524

mcs/class/corlib/System.Runtime.Remoting/ChangeLog
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs

index 01b87c6d466b1b2aba20a22844037c81b2f6dbf1..78e3aae672c52b89af423d4e38ccc6e656ae52f0 100755 (executable)
@@ -1,3 +1,8 @@
+2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
+
+       * RemotingServices.cs (GetDomainProxy): Use the new InvokeInDomain 
+       function instead of calling SetDomain.
+
 2003-10-23  Lluis Sanchez Gual <lluis@ximian.com>
 
        * RemotingServices.cs: Do not create an identity for an object if it
index 0c133b1c711e037514fcec3ff0d76fb3391d8edf..db59cc84130006b86909863e3cbc177bf00a8ba3 100644 (file)
@@ -542,16 +542,15 @@ namespace System.Runtime.Remoting
                        byte[] data = null;
 
                        Context currentContext = Thread.CurrentContext;
-                       AppDomain currentDomain = AppDomain.InternalSetDomain (domain);
-                       try 
+
+                       try
                        {
-                               data = domain.GetMarshalledDomainObjRef ();
+                               data = (byte[])AppDomain.InvokeInDomain (domain, typeof (AppDomain).GetMethod ("GetMarshalledDomainObjRef", BindingFlags.Instance|BindingFlags.NonPublic), domain, null);
                        }
-                       finally 
+                       finally
                        {
-                               AppDomain.InternalSetDomain (currentDomain);
                                AppDomain.InternalSetContext (currentContext);
-                       }
+                       }                               
 
                        MemoryStream stream = new MemoryStream (data);
                        ObjRef appref = (ObjRef) CADSerializer.DeserializeObject (stream);