[rfc][icedtea-web] Fix javascript url error in JSToJSet reproducer

Jiri Vanek jvanek at redhat.com
Mon Feb 9 13:43:03 UTC 2015


On 02/09/2015 02:40 PM, Jiri Vanek wrote:
> On 02/06/2015 02:58 PM, Jie Kang wrote:
>>
>>
>> ----- Original Message -----
>>> Hello,
>>>
>>> The reproducers for JSToJSet are broken due to errors in the javascript code.
>>> The error causing the code to fail has been fixed by decoding the URL before
>>> using it in arguments.
>>>
>>> Previously a URL containing characters like [ was not decoded and so the
>>> argument would end up including the characters "%5B" as opposed to "[".
>>>
>>>
>>> Okay to push?
>>>
>>>
>>>
>>> There are still some parts of the javascript that result in failing tests but
>>> it is not 100% clear whether the behaviour is expected when compared to
>>> Oracle's implementation of live-connect.
>>>
>>> Example:
>>>
>>> javascript code:
>>>
>>> Case 1:
>>> var value = "1";
>>> applet.integer = value;
>>>
>>> versus
>>>
>>> Case 2:
>>> var value = 1;
>>> applet.integer = value;
>>>
>>>
>>> When applet.integer is declared as an Integer in java code, case 1 fails
>>> while case 2 passes. The javascript code in JSToJSet tests for case 1 at the
>>> moment.
>>>
>>> However, when applet.integer is declared as an int (primitive as opposed to
>>> Object) in java code, both cases pass.
>>>
>>> This affects most boxed primitives such as Double, Float, Byte, etc.
>>>
>>> I'm assuming it should pass for Case 1 when using Integer, so there are still
>>> some issues with our implementation of LiveConnect :\
>>>
>>>
>>> Regards,
>>
>> Ping.
>>
>>>
>>>
>
> Sorry, slipped out of radar.
>
>
> The patch looks good. Two nits:
>
> please wrap: criptable=true -> criptable="true" (unless it breaks reproducer)
> Why var decodedurl = decodeURI(document.URL); ? From the patch seems unused ( I had not tried )?
>
> Ok to push with true in quotes, and removed decodedurl
>
> If decodedurl have to be kept, please use decodedUrl or something similar.
>

/me to stupid to live.

decodedurl is of course used.

Please rename it to decodedUrl and wrap true in scriptable=true to quotes.

Ok for head (and 1.5 if valid (Afaik is valid)  afterthose two minors fixed.


J.



More information about the distro-pkg-dev mailing list