Thanks, Thomas
There is an open debate as to whether this should be allowed.
See https://bugzilla.mozilla.org/show_bug.cgi?id=375835
-- David P. Caldwell
http://www.inonit.com/
I'd independently submitted a patch for https://bugzilla.mozilla.org/show_bug.cgi?id=392481
which defines a feature on a ContextFactory that, when enabled, allows
access to non-public members. The feature is disabled by default.
I understand this is a little different from what's requested in
375835, but it highlights the approach of allowing the behavior to be
configured. I don't think this is a one-size-fits-all problem, as
different users will have different needs for security and access.
Certainly someone who is using Rhino for testing Java classes will
have different needs for this feature than someone who is evaluating
scripts from untrusted users on the web.
--Norris