RFR(S) 8158338: Nashorn's ScriptLoader split delegation has to adjusted
Jim Laskey (Oracle)
james.laskey at oracle.com
Wed Jun 1 10:56:44 UTC 2016
+1
> On Jun 1, 2016, at 6:14 AM, Sundararajan Athijegannathan <sundararajan.athijegannathan at oracle.com> wrote:
>
> I had to update webrev to handle the case of appLoader being null in
> ScriptLoader. I had used Class.forName(String, boolean, ClassLoader).
> But that methods introduces a security check when caller is not
> bootstrap (like nashorn) and ClassLoader is null! In any case,
> bootloader delegation has already happened via parent delegation. So,
> I'm checking and handling appLoader null case by throwing
> ClassNotFoundException.
>
> Updated webrev: http://cr.openjdk.java.net/~sundar/8158338/webrev.01/
>
> -Sundar
>
> On 6/1/2016 12:59 PM, Sundararajan Athijegannathan wrote:
>> Hi,
>>
>> Thanks for the review.
>>
>> We have an existing test that depends on "split" delegation implemented
>> in the ScriptLoader.
>>
>> http://hg.openjdk.java.net/jdk9/dev/nashorn/file/7fb2bf00347b/test/script/basic/JDK-8024619.js
>>
>> The current code adjustment is about which loader is "parent" and which
>> one "side" delegatee. Previously, parent was Context's appLoader and
>> side-delegatee was the structure loader.
>> Now, it is other way around. But, the behavior seen from scripts should
>> remain same in either case. The aforementioned test (along with other
>> nashorn tests) passes with the adjusted
>> delegation setup as well.
>>
>> -Sundar
>>
>> On 6/1/2016 12:49 PM, Marcus Lagergren wrote:
>>> This looks good. Is it possible to test it?
>>>
>>> /M
>>>
>>>> On 01 Jun 2016, at 08:46, Sundararajan Athijegannathan <sundararajan.athijegannathan at oracle.com> wrote:
>>>>
>>>> Please review http://cr.openjdk.java.net/~sundar/8158338/webrev.00/ for
>>>> https://bugs.openjdk.java.net/browse/JDK-8158338
>>>>
>>>> Thanks,
>>>>
>>>> -Sundar
>>>>
>
More information about the nashorn-dev
mailing list