Reuse top level scope for the complete request processing thread
----------------------------------------------------------------
Key: SLING-677
URL: https://issues.apache.org/jira/browse/SLING-677
Project: Sling
Issue Type: Bug
Components: Scripting JavaScript (Rhino)
Affects Versions: Scripting JavaScript 2.0.2
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: Scripting JavaScript 2.1.0
Currently the RhinoJavaScriptEngine creates a new scope for each call to the
eval method to execute the respective script. On the other hand Rhino maintains
a per-thread top level scope, which is set when the first script is called.
This causes multiple top level scopes to be used by the script and Rhino and
thus may cause reference issues.
It would be better to only create one single top level scope, when the rhino is
used for the first time during request processing and to reuse that scope on
included scripts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.