Arbitrary javax.script.Bindings objects as ENGINE_SCOPE objects are not handled as expected.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b106
    • generic
    • generic

      Nashorn initializes the default ScriptContext's ENGINE_SCOPE Bindings with ScriptObjectMirror wrapping Nashorn's Global instance.

      Also, if user creates Bindings using ScriptEngine.createBindings API, nashorn engine creates ScriptObjectMirror wrapping (separate) Nashorn Global instances.

      But when user passes another object of another Bindings implementation as ENGINE_SCOPE - say javax.script.SimpleBindings instance or even user's own Bindings implementation class - then nashorn engine ends up using engine-wide 'default' global instance. This would confuse API user. We need to provide same isolation - separate global instance associated with any Bindings object - in all cases.

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: