On Fri Aug 06 03:08:57 2010, CLAESJAC wrote:
Show quoted text> On Thu Aug 05 18:11:30 2010, crispygoth wrote:
>
> > Upon further investigation, I discovered that the package builds
> > successfully with libmozjs 1.9.1.10, but not with 1.9.1.11. I can't see
> > any changes related to E4X between the two, but you may have more idea..
>
> What spidermonkey version is libmozjs 1.9.1.11 built from?
jsversion.h says 180 for both 1.9.1.10 and 1.9.1.11.
The code comes from the mozilla-1.9.1 branch at
http://hg.mozilla.org/releases/
The error in $@ after the parsing failure (test 1 of t/26-e4x.t) is
XML cannot be the whole program at main line 21 in 2
I'm pretty sure the relevant change is
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/d4b2224cf458
which unfortunately points to the non public bug
https://bugzilla.mozilla.org/show_bug.cgi?id=568148
Background of the 'XML cannot be the whole program' error can be found at
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/c4ba70070012
https://bugzilla.mozilla.org/show_bug.cgi?id=375250
As I understand it, the test for basic E4X functionality got broken by
a security related change that now rejects treating pure XML as valid
top level JavaScript.
A workaround is to change the test so that it mixes some real JavaScript
code with the XML element, for example by explicitly getting the value
of the object. See the attached patch which makes the test pass for us
again.
Alternatively, do you think this could/should be worked around in the
actual code somehow? Perhaps by adding an extra call frame in the eval()
as this only seems to concern top level calls? (Hm, that would probably
break too many things. Apologies for my ignorance of the details.)
Many thanks for your work,
--
Niko Tyni (Debian Perl Group)
ntyni@debian.org