aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Interfaces
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-14 00:23:11 +0000
committerJustin Clark-Casey (justincc)2012-01-14 00:23:11 +0000
commitb5bb559cc020df0b2e7d77a46f7d47a8fed1bc9f (patch)
treec4516b37b09c2a104019845ef167c262836487e9 /OpenSim/Region/ScriptEngine/Interfaces
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-b5bb559cc020df0b2e7d77a46f7d47a8fed1bc9f.zip
opensim-SC-b5bb559cc020df0b2e7d77a46f7d47a8fed1bc9f.tar.gz
opensim-SC-b5bb559cc020df0b2e7d77a46f7d47a8fed1bc9f.tar.bz2
opensim-SC-b5bb559cc020df0b2e7d77a46f7d47a8fed1bc9f.tar.xz
Register the UrlModule for script engine events OnScriptRemoved and OnObjectRemoved just once in the UrlModule itself, rather than repeatedly for every script.
Doing this in every script is unnecessary since the event trigger is parameterized by the item id. All that would happen is 2000 scripts would trigger 1999 unnecessary calls, and a large number of initialized scripts may eventually trigger a StackOverflowException. Registration moved to UrlModule so that the handler is registered for all script engine implementations. This required moving the OnScriptRemoved and OnObjectRemoved events (only used by UrlModule in core) from IScriptEngine to IScriptModule to avoid circular references.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Interfaces')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs7
1 files changed, 0 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
index 581a9a9..17c2708 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
@@ -42,10 +42,6 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
42 /// An interface for a script API module to communicate with 42 /// An interface for a script API module to communicate with
43 /// the engine it's running under 43 /// the engine it's running under
44 /// </summary> 44 /// </summary>
45
46 public delegate void ScriptRemoved(UUID script);
47 public delegate void ObjectRemoved(UUID prim);
48
49 public interface IScriptEngine 45 public interface IScriptEngine
50 { 46 {
51 /// <summary> 47 /// <summary>
@@ -57,9 +53,6 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
57 53
58 IScriptModule ScriptModule { get; } 54 IScriptModule ScriptModule { get; }
59 55
60 event ScriptRemoved OnScriptRemoved;
61 event ObjectRemoved OnObjectRemoved;
62
63 /// <summary> 56 /// <summary>
64 /// Post an event to a single script 57 /// Post an event to a single script
65 /// </summary> 58 /// </summary>