scriptpad testing
Jim Laskey (Oracle)
james.laskey at oracle.com
Wed Jan 23 05:26:59 PST 2013
Bug ID: 8006755
On 2013-01-23, at 9:22 AM, "A. Sundararajan" <sundararajan.athijegannathan at oracle.com> wrote:
> Hi,
>
> Yes, 'sync' is rhino specific. 'with' statement seems to be a bug. I'll file a bug.
>
> I've recently made some changes to jsr223 interface to nashorn. In particular global scope handling and multiple globals per engine etc. have been improved and fixed. Please pull the latest code. And please send us your test cases showing failure.
>
> Thanks,
> -Sundar
>
>
> On Wednesday 23 January 2013 06:01 PM, Andreas Rieber wrote:
>> Hi,
>>
>> i tried now the scriptpad sample from openjdk with Nashorn and have found 2 minor issues.
>>
>> The file: jdk8/jdk/src/share/sample/scripting/scriptpad/src/resources/conc.js relies on a 'sync' function. Looks to be a Rhino only - so a migration issue.
>>
>> The next one is about scopes in file: jdk8/jdk/src/share/sample/scripting/scriptpad/src/resources/scriptpad.js. I removed everything unimportant and the following code snippet show the problem:
>>
>> ------
>> var guiPkgs = { JFrame: function() { print("created"); } };
>>
>> with (guiPkgs) {
>> function main() {
>> function createFrame() {
>> var frame = new JFrame();
>> }
>>
>> createFrame();
>> }
>> }
>>
>> main();
>>
>> ------
>>
>> 'created' should come out but JFrame is unknown. I tested this with some browsers (Firefox, Safari, Chrome) but only Rhino and Firefox can handle that construct.
>>
>> I had also some more complex problems related to JSR223 but will come back with samples when i can separate them better.
>>
>> - Andreas
>>
>
More information about the nashorn-dev
mailing list