Hi! We are using dynamic scopes to share functions and prototypes between several instance scopes. Sometimes we have JavaScript code that triggers the creation of a new instance scope (for instance 'callbacks' in our application). Each new instance scope has its own global object G that is created and 'put' into the freshly created scope. This works as long as we don't create a new instance scope from within another -- the outer -- one. In this case the inner instance scope somehow inherits the global G from the 'parent' -- the outer -- instance scope.
This is probably because of Context.topCallScope. (Scott has described the same problem in more detail here: http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/browse_thread/thread/f0c09e662d04fdb7/8b7678165885c42f) What we seem to need is a means to have two (or more) Contexts in one and the same Java Thread. Scott said, he used new Context() to achive this. But Context() is deprecated. I can't figure out any alternative way to get a second Context for a given Thread. Is there really a reason why we are not to have more than one Context? Couldn't ContextFactory.makeContext() simple be public? Thanks a lot for your help! Florian. _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
