diff options
author | Tedd Hansen | 2008-11-27 13:41:26 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-11-27 13:41:26 +0000 |
commit | 1eeffcd89e5ef30ccfe7bbefc98d362ebfae6a89 (patch) | |
tree | f6c4e909aeaa2a6e73b9dae484b1ec51cf0ecf58 /OpenSim/Region/ScriptEngine/Shared | |
parent | * Adds texture download requests to pcampbot to more accurately represent load. (diff) | |
download | opensim-SC_OLD-1eeffcd89e5ef30ccfe7bbefc98d362ebfae6a89.zip opensim-SC_OLD-1eeffcd89e5ef30ccfe7bbefc98d362ebfae6a89.tar.gz opensim-SC_OLD-1eeffcd89e5ef30ccfe7bbefc98d362ebfae6a89.tar.bz2 opensim-SC_OLD-1eeffcd89e5ef30ccfe7bbefc98d362ebfae6a89.tar.xz |
Test commit.. just contains div trace and other stuff.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
3 files changed, 27 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs index 63ae6c7..d76c7c1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs | |||
@@ -205,13 +205,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
205 | // | 205 | // |
206 | if ( !(tie.InnerException is EventAbortException) ) | 206 | if ( !(tie.InnerException is EventAbortException) ) |
207 | { | 207 | { |
208 | throw tie; | 208 | throw; |
209 | } | 209 | } |
210 | } | 210 | } |
211 | catch (Exception e) | 211 | |
212 | { | ||
213 | throw e; | ||
214 | } | ||
215 | } | 212 | } |
216 | 213 | ||
217 | protected void initEventFlags() | 214 | protected void initEventFlags() |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index 06307bb..15604dc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
39 | { | 39 | { |
40 | public partial class ScriptBaseClass : MarshalByRefObject, IScript | 40 | public partial class ScriptBaseClass : MarshalByRefObject, IScript |
41 | { | 41 | { |
42 | private Dictionary<string,MethodInfo> inits = new Dictionary<string,MethodInfo>(); | 42 | private Dictionary<string, MethodInfo> inits = new Dictionary<string, MethodInfo>(); |
43 | 43 | ||
44 | // Object expires if we don't keep it alive | 44 | // Object expires if we don't keep it alive |
45 | // sponsor will be added on object load | 45 | // sponsor will be added on object load |
@@ -50,25 +50,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
50 | ILease lease = (ILease)base.InitializeLifetimeService(); | 50 | ILease lease = (ILease)base.InitializeLifetimeService(); |
51 | if (lease.CurrentState == LeaseState.Initial) | 51 | if (lease.CurrentState == LeaseState.Initial) |
52 | { | 52 | { |
53 | //lease.InitialLeaseTime = TimeSpan.Zero; | ||
53 | lease.InitialLeaseTime = TimeSpan.FromMinutes(1); | 54 | lease.InitialLeaseTime = TimeSpan.FromMinutes(1); |
54 | lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); | 55 | lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); |
55 | lease.RenewOnCallTime = TimeSpan.FromSeconds(2); | 56 | lease.RenewOnCallTime = TimeSpan.FromSeconds(2); |
56 | } | 57 | } |
57 | return lease; | 58 | return lease; |
58 | } | 59 | } |
60 | #if DEBUG | ||
61 | // For tracing GC while debugging | ||
62 | public static bool GCDummy = false; | ||
63 | ~ScriptBaseClass() | ||
64 | { | ||
65 | GCDummy = true; | ||
66 | } | ||
67 | #endif | ||
68 | |||
59 | 69 | ||
60 | public ScriptBaseClass() | 70 | public ScriptBaseClass() |
61 | { | 71 | { |
62 | m_Executor = new Executor(this); | 72 | m_Executor = new Executor(this); |
63 | 73 | ||
64 | MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance); | 74 | MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public | BindingFlags.Instance); |
65 | 75 | ||
66 | foreach (MethodInfo mi in myArrayMethodInfo) | 76 | foreach (MethodInfo mi in myArrayMethodInfo) |
67 | { | 77 | { |
68 | if (mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType") | 78 | if (mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType") |
69 | { | 79 | { |
70 | string type=mi.Name.Substring(7); | 80 | string type = mi.Name.Substring(7); |
71 | inits[type]=mi; | 81 | inits[type] = mi; |
72 | } | 82 | } |
73 | } | 83 | } |
74 | } | 84 | } |
@@ -130,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
130 | 140 | ||
131 | foreach (FieldInfo field in fields) | 141 | foreach (FieldInfo field in fields) |
132 | { | 142 | { |
133 | m_Fields[field.Name]=field; | 143 | m_Fields[field.Name] = field; |
134 | 144 | ||
135 | if (field.FieldType == typeof(LSL_Types.list)) // ref type, copy | 145 | if (field.FieldType == typeof(LSL_Types.list)) // ref type, copy |
136 | { | 146 | { |
@@ -141,7 +151,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
141 | c.Data = data; | 151 | c.Data = data; |
142 | vars[field.Name] = c; | 152 | vars[field.Name] = c; |
143 | } | 153 | } |
144 | else if (field.FieldType == typeof(LSL_Types.LSLInteger) || | 154 | else if (field.FieldType == typeof(LSL_Types.LSLInteger) || |
145 | field.FieldType == typeof(LSL_Types.LSLString) || | 155 | field.FieldType == typeof(LSL_Types.LSLString) || |
146 | field.FieldType == typeof(LSL_Types.LSLFloat) || | 156 | field.FieldType == typeof(LSL_Types.LSLFloat) || |
147 | field.FieldType == typeof(Int32) || | 157 | field.FieldType == typeof(Int32) || |
@@ -174,7 +184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
174 | Array.Copy(data, 0, v.Data, 0, data.Length); | 184 | Array.Copy(data, 0, v.Data, 0, data.Length); |
175 | m_Fields[var.Key].SetValue(this, v); | 185 | m_Fields[var.Key].SetValue(this, v); |
176 | } | 186 | } |
177 | else if (m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLInteger) || | 187 | else if (m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLInteger) || |
178 | m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLString) || | 188 | m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLString) || |
179 | m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLFloat) || | 189 | m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLFloat) || |
180 | m_Fields[var.Key].FieldType == typeof(Int32) || | 190 | m_Fields[var.Key].FieldType == typeof(Int32) || |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs index 5b28608..13c25d7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptSponsor.cs | |||
@@ -14,5 +14,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Runtime | |||
14 | { | 14 | { |
15 | return TimeSpan.FromMinutes(2); | 15 | return TimeSpan.FromMinutes(2); |
16 | } | 16 | } |
17 | #if DEBUG | ||
18 | // For tracing GC while debugging | ||
19 | public static bool GCDummy = false; | ||
20 | ~ScriptSponsor() | ||
21 | { | ||
22 | GCDummy = true; | ||
23 | } | ||
24 | #endif | ||
17 | } | 25 | } |
18 | } | 26 | } |