[Voiceglue] Spidermonkey issue..?

James Green james.green at mjog.com
Thu Apr 8 11:43:34 UTC 2010


Well I've switched from one 3rd party lib to another 3rd party lib with
the same error:
 
12:33:27:289 EROR OPEN_VXI scaraman callid=[8005]
|139901345446224|8005|SEVERE|swi:SBjsi|501|SBjsi: ECMAScript engine
exception|errmsg=TypeError: function $ does not always return a
value|line=139899969732909|linetxt=function $(c,t){t=c[m];delete
c[m];try{e(c)}catch(z){c[m]=t;return 1}};|tokentxt=};

...Where '$' was 'str' in the first library.
 
Something, somewhere, is not happy. I'm now concerned as to just what I
can and cannot expect from using Javascript within voicexml using
voiceglue.
 
All I want to do is record a history of key=value pairs and submit them
at the end as a list parsable within PHP. I hoped JSON might provide an
easy path.
 

________________________________

From: voiceglue-bounces at voiceglue.org
[mailto:voiceglue-bounces at voiceglue.org] On Behalf Of James Green
Sent: 08 April 2010 11:54
To: General discussion about voiceglue
Subject: [Voiceglue] Spidermonkey issue..?


Hi,
 
Apparently Voiceglue uses Spidermonkey to provide JavaScript. In our
case we have 1.8.1 [1] which provides a JSON.stringify() method [2].
 
Using this within voiceglue doesn't appear to work however:
 
11:40:58:191 EROR OPEN_VXI scaraman callid=[7995]
|139901345446224|7995|SEVERE|swi:SBjsi|501|SBjsi: ECMAScript engine
exception|errmsg=ReferenceError: JSON is not
defined|line=139899969732609|linetxt=|tokentxt=

Snippet from the script:
<script>var packet = JSON.stringify(document.actions);</script>

I was rather hoping not to have to import a 3rd party script, so if I'm
doing something wrong could someone kindly point out the problem?
 
Thanks,
 
James
 
[1] $ dpkg -l | grep libmoz
ii  libmozjs-dev
1.8.1.16+nobinonly-0ubuntu1       Development files for the Mozilla
SpiderMonk
ii  libmozjs0d
1.8.1.16+nobinonly-0ubuntu1       The Mozilla SpiderMonkey JavaScript
library
[2] https://developer.mozilla.org/en/Using_native_JSON

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.801 / Virus Database: 271.1.1/2797 - Release Date: 04/08/10
07:32:00


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.voiceglue.org/pipermail/voiceglue/attachments/20100408/51635e33/attachment.html>
-------------- next part --------------

No virus found in this outgoing message.
Checked by AVG - www.avg.com 
Version: 9.0.801 / Virus Database: 271.1.1/2798 - Release Date: 04/08/10 07:32:00


More information about the Voiceglue mailing list