The problem with lazy loading and object sealing has been fixed. The new behaviour is to initialize lazily loaded references when an object is sealed. See https://bugzilla.mozilla.org/show_bug.cgi?id=319614
The new release candidate for 1.7R2 already contains this fix: ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2-RC2.zip Hannes On Jan 24, 11:28 pm, "[email protected]" <[email protected]> wrote: > I am creating a system that runs scripts in separate threads to handle > events. The system stays up for weeks or months at a time. > > I want to have a sealed shared scope where the whole hierarchy is > sealed to protect from programming errors (I do not need to worry > about malicious scripts). > > The problem I am encountering is that java packages are loaded lazily > and therefore cannot load because the package is sealed. If I do not > seal the 'Packages' and 'java' objects, developers are allowed to > assign to these objects and their children, which I do not want. > > Is there a better way to allow the scripter access to packages without > worrying that they'll add add/access objects to the packages? > > Or is just better to make the call to initStandardObjects() and load > my own libraries each time the job is fired? (That is, how much memory > will be consumed per call to initStandardObjects?) > > Thank you _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
