Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Scripting JavaScript 2.0.2
-
None
Description
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.