Test commit.. just contains div trace and other stuff.

0.6.1-post-fixes
Tedd Hansen 2008-11-27 13:41:26 +00:00
parent f7beef3283
commit 1eeffcd89e
3 changed files with 27 additions and 12 deletions

View File

@ -205,13 +205,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
// //
if ( !(tie.InnerException is EventAbortException) ) if ( !(tie.InnerException is EventAbortException) )
{ {
throw tie; throw;
} }
} }
catch (Exception e)
{
throw e;
}
} }
protected void initEventFlags() protected void initEventFlags()

View File

@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{ {
public partial class ScriptBaseClass : MarshalByRefObject, IScript public partial class ScriptBaseClass : MarshalByRefObject, IScript
{ {
private Dictionary<string,MethodInfo> inits = new Dictionary<string,MethodInfo>(); private Dictionary<string, MethodInfo> inits = new Dictionary<string, MethodInfo>();
// Object expires if we don't keep it alive // Object expires if we don't keep it alive
// sponsor will be added on object load // sponsor will be added on object load
@ -50,25 +50,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
ILease lease = (ILease)base.InitializeLifetimeService(); ILease lease = (ILease)base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial) if (lease.CurrentState == LeaseState.Initial)
{ {
//lease.InitialLeaseTime = TimeSpan.Zero;
lease.InitialLeaseTime = TimeSpan.FromMinutes(1); lease.InitialLeaseTime = TimeSpan.FromMinutes(1);
lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
lease.RenewOnCallTime = TimeSpan.FromSeconds(2); lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
} }
return lease; return lease;
} }
#if DEBUG
// For tracing GC while debugging
public static bool GCDummy = false;
~ScriptBaseClass()
{
GCDummy = true;
}
#endif
public ScriptBaseClass() public ScriptBaseClass()
{ {
m_Executor = new Executor(this); m_Executor = new Executor(this);
MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance); MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public | BindingFlags.Instance);
foreach (MethodInfo mi in myArrayMethodInfo) foreach (MethodInfo mi in myArrayMethodInfo)
{ {
if (mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType") if (mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType")
{ {
string type=mi.Name.Substring(7); string type = mi.Name.Substring(7);
inits[type]=mi; inits[type] = mi;
} }
} }
} }
@ -130,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
foreach (FieldInfo field in fields) foreach (FieldInfo field in fields)
{ {
m_Fields[field.Name]=field; m_Fields[field.Name] = field;
if (field.FieldType == typeof(LSL_Types.list)) // ref type, copy if (field.FieldType == typeof(LSL_Types.list)) // ref type, copy
{ {

View File

@ -14,5 +14,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime
{ {
return TimeSpan.FromMinutes(2); return TimeSpan.FromMinutes(2);
} }
#if DEBUG
// For tracing GC while debugging
public static bool GCDummy = false;
~ScriptSponsor()
{
GCDummy = true;
}
#endif
} }
} }