aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine
diff options
context:
space:
mode:
authorMelanie2012-04-18 20:01:41 +0100
committerMelanie2012-04-18 20:01:41 +0100
commitea73a035531a0e957f54fe897f3a3ff7ca3dc22d (patch)
tree16191995d905daa9d12a06c2d55fec2645584450 /OpenSim/Region/ScriptEngine/XEngine
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-ea73a035531a0e957f54fe897f3a3ff7ca3dc22d.zip
opensim-SC_OLD-ea73a035531a0e957f54fe897f3a3ff7ca3dc22d.tar.gz
opensim-SC_OLD-ea73a035531a0e957f54fe897f3a3ff7ca3dc22d.tar.bz2
opensim-SC_OLD-ea73a035531a0e957f54fe897f3a3ff7ca3dc22d.tar.xz
Don't re-add the assembly resolver for each script if not creating the appdomain
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index b7903d5..ad2f12e 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1021,11 +1021,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1021 1021
1022 AppDomain sandbox; 1022 AppDomain sandbox;
1023 if (m_AppDomainLoading) 1023 if (m_AppDomainLoading)
1024 {
1024 sandbox = AppDomain.CreateDomain( 1025 sandbox = AppDomain.CreateDomain(
1025 m_Scene.RegionInfo.RegionID.ToString(), 1026 m_Scene.RegionInfo.RegionID.ToString(),
1026 evidence, appSetup); 1027 evidence, appSetup);
1028 m_AppDomains[appDomain].AssemblyResolve +=
1029 new ResolveEventHandler(
1030 AssemblyResolver.OnAssemblyResolve);
1031 }
1027 else 1032 else
1033 {
1028 sandbox = AppDomain.CurrentDomain; 1034 sandbox = AppDomain.CurrentDomain;
1035 }
1029 1036
1030 //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); 1037 //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
1031 //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); 1038 //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
@@ -1037,9 +1044,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1037 1044
1038 m_AppDomains[appDomain] = sandbox; 1045 m_AppDomains[appDomain] = sandbox;
1039 1046
1040 m_AppDomains[appDomain].AssemblyResolve +=
1041 new ResolveEventHandler(
1042 AssemblyResolver.OnAssemblyResolve);
1043 m_DomainScripts[appDomain] = new List<UUID>(); 1047 m_DomainScripts[appDomain] = new List<UUID>();
1044 } 1048 }
1045 catch (Exception e) 1049 catch (Exception e)
@@ -1984,4 +1988,4 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1984// m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID); 1988// m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID);
1985 } 1989 }
1986 } 1990 }
1987} \ No newline at end of file 1991}