/[Apache-SVN]
ViewVC logotype

Revision 1728248


Jump to revision: Previous Next
Author: rwhitcomb
Date: Wed Feb 3 02:35:19 2016 UTC (8 years, 2 months ago)
Changed paths: 3
Log Message:
PIVOT-965:  Fix an issue with Java 8 (Nashorn script engine) and the way
we deal with included scripts.  The problem is that in creating the new
serializer for the included script, the script engine ends up creating a
new "nashorn.global" context, which does not include any previous defined
variables or functions.  This new context persists as the current "global"
context after the included script has been read.  Then when attempting to
look up any variables/functions defined before the "include" they won't be
found.

The "solution" (or workaround) is to detect when the new global context is
being established and copy the old definitions into it.  Now, that sort of
begs the question as to:
* Is this the right place to do this?
* What about the situation when "inline" is false for the included script?
* What about multiple includes?
* What about nested includes?

These are still unanswered questions needing more research.  So, for now,
just add the workaround (and some of the debug code still there, but
commented out).

This is a merge of revision 1728247 from trunk to branches/2.0.x.


Changed paths

Path Details
Directorypivot/branches/2.0.x/ modified , props changed
Directorypivot/branches/2.0.x/core/src/org/apache/pivot/beans/BXMLSerializer.java modified , text changed
Directorypivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot965/
(Copied from pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot965, r1728247)
added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26