Attila,
Thanks for confirming that with me. My code appears to be running fine
despite having a null factory field. Does Context.exit() and
Context.enter() get called at some unpredictable point? I'm not
calling them at all myself and those look like the only methods I'm
slightly concerned about, since I don't know what they do.

In other words: am I safe to extend Context in the latest released
version of Rhino, or do you strongly recommend I go with 1.7R2 so that
I can pass in the factory?

Patrick

On Thu, Feb 19, 2009 at 6:55 AM, Attila Szegedi <[email protected]> wrote:
> On 2009.02.19., at 15:25, Patrick Lightbody wrote:
>
>> Because the "factory" field is private and is only set in a
>> package-protected constructor, and because getFactory() is
>> public+final, there is no way for me to extend Context while still
>> passing in a reference to the factory. In the example JavaDocs, this
>> looks like it's skipped entirely.
>
> Yep, others hit that problem too. I promoted the visibility of that
> constructor to protected for benefit of subclasses in 1.7R2. 1.7R2 is still
> unreleased, but you can grab a RC at
> <ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2-RC1.zip>
>
> Hope that helps,
>  Attila.
>
>
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to