Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-677

Reuse top level scope for the complete request processing thread

    XMLWordPrintableJSON

Details

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

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: