From 1893164d26f5ff62784055ee00612bbc9984ae4e Mon Sep 17 00:00:00 2001
From: Tedd Hansen
Date: Sun, 19 Aug 2007 06:52:59 +0000
Subject: Moved script loading from ScriptManager to AppDomainManager. Now
increases scripts loaded count in AppDomain properly.
---
.../ScriptEngine/DotNetEngine/ScriptManager.cs | 30 ++--------------------
1 file changed, 2 insertions(+), 28 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 926ec74..9a65b5c 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -172,15 +172,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
// * Insert yield into code
FileName = ProcessYield(FileName);
- // * Find next available AppDomain to put it in
- AppDomain FreeAppDomain = m_scriptEngine.myAppDomainManager.GetFreeAppDomain();
- // * Load and start script, for now with dummy host
-
//OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass Script = LoadAndInitAssembly(FreeAppDomain, FileName);
//OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script = LoadAndInitAssembly(FreeAppDomain, FileName, ObjectID);
- OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script = LoadAndInitAssembly(FreeAppDomain, FileName, ObjectID);
+ OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script = m_scriptEngine.myAppDomainManager.LoadScript(FileName, ObjectID);
+
// Add it to our temporary active script keeper
//Scripts.Add(FullScriptID, Script);
@@ -207,30 +204,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
return FileName;
}
- ///
- /// Does actual loading and initialization of script Assembly
- ///
- /// AppDomain to load script into
- /// FileName of script assembly (.dll)
- ///
- private OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass LoadAndInitAssembly(AppDomain FreeAppDomain, string FileName, IScriptHost host)
- {
-
- //LSL_BaseClass mbrt = (LSL_BaseClass)FreeAppDomain.CreateInstanceAndUnwrap(FileName, "SecondLife.Script");
- //Console.WriteLine("Base directory: " + AppDomain.CurrentDomain.BaseDirectory);
- LSL_BaseClass mbrt = (LSL_BaseClass)FreeAppDomain.CreateInstanceFromAndUnwrap(FileName, "SecondLife.Script");
- //LSL_BuiltIn_Commands_Interface mbrt = (LSL_BuiltIn_Commands_Interface)FreeAppDomain.CreateInstanceFromAndUnwrap(FileName, "SecondLife.Script");
- Type mytype = mbrt.GetType();
-
- Console.WriteLine("is proxy={0}", RemotingServices.IsTransparentProxy(mbrt));
-
-
- //mbrt.Start();
- return mbrt;
- //return (LSL_BaseClass)mbrt;
-
- }
///
/// Execute a LL-event-function in Script
--
cgit v1.1