On Jan 16, 3:51 am, Merten Schumann <[email protected]> wrote: > Hello, > > I'm using (only) ScriptableObject.sealObject() to seal scopes which I want to > have sealed in a hierarchy/chain of scopes. Cool stuff, works pretty well :-) >
Yes, I use this as well. > Didn't know about Context.seal(Object sealKey) before. First I thought fixing > the bug would break existing code out there and the documentation should be > changed instead - but after reading the bugzilla entry, I'd agree it's a bug > to be fixed. I mean, obviously it's not behaving as described there ... > > Maybe together with Context.seal(Object sealKey) the introduction of > something like Context.enter/exitSealed(Object sealKey) would have made > sense, to support sealing directly in conjunction with enter/exit? > > Greg, in the past I tried to prevent scripts from modifying Context' > properties by using ClassShutter - I simply disallowed Rhino's Context class > itself from being used. But I cannot tell if this was ever working ... > My ClassShutter uses a White-List so I'm not really worried about about scripts using untrusted java to modify the context. > And (how do) you invoke seal() "long before enter/exit" - hm, seal() is not a > static method at Context, so how can you invoke it BEFORE Context.enter()? In > your constructor, okay - hm, is your Context really sealed, have you checked > it? > Yes, I'm currently calling context.seal() from the context constructor after setting it up the way I want it. I'm probably being paranoid about this as the ClassShutter would prevent and context modification. > cu > Merten > _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
