If you create one class in an empty package (like with sun.invoke.empty.Empty) and use it as host class, it should be ok, no ?
Rémi ----- Mail original ----- > De: "Attila Szegedi" <attila.szeg...@oracle.com> > À: "Remi Forax" <fo...@univ-mlv.fr> > Cc: nashorn-dev@openjdk.java.net > Envoyé: Mercredi 9 Septembre 2015 16:56:50 > Objet: Re: Review request for JDK-8135251: Use Unsafe.defineAnonymousClass > for loading Nashorn script code > > There’s one host class per CodeSource. Host classes provide their > ProtectionDomain to the anonymous classes, and we must code for running > under a security manager. > > > On Sep 9, 2015, at 4:40 PM, Remi Forax <fo...@univ-mlv.fr> wrote: > > > > Hi Attila, > > in your patch you're using several different host classes (i beleive one by > > script) and i don't understand why ? > > > > cheers, > > Rémi > > > > On 09/09/2015 03:35 PM, Attila Szegedi wrote: > >> Please review JDK-8135251 "Use Unsafe.defineAnonymousClass for loading > >> Nashorn script code" at > >> <http://cr.openjdk.java.net/~attila/8135251/webrev.jdk9> for > >> <https://bugs.openjdk.java.net/browse/JDK-8135251> > >> > >> Implementation notes are in > >> <https://bugs.openjdk.java.net/browse/JDK-8135251?focusedCommentId=13841379&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13841379 > >> <https://bugs.openjdk.java.net/browse/JDK-8135251?focusedCommentId=13841379&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13841379>> > >> > >> Thanks, > >> Attila. > > > >