The patch to address this would go something like this:

org.mozilla.javaqscript.ScriptRuntime.java

lines 219 - 221 (as of 1.7R2)
if (cx.getLanguageVersion() >= Context.VERSION_1_7) {
  NativeIterator.init(scope, sealed); // Also initializes NativeGenerator
}

Similar code around RegExp isn't possible, though it was introduced in
VERSION_1_2, as it uses LazyLoadedCtor.  It would take more work, but is
still possible... or you could start the lazyNames for loop at 1 instead of
0.  Not very portable/expandable, but it'd work for RegExp.

You could sort the LazyNames array based on the feature's version number,
with the universal stuff at the end.  Since the XML stuff is controlled with
a context flag instead of a version number, this would be of Limited
Utility.  I haven't done /all/ the research, but it looks like RegExp is the
only thing in the LazyNames array that needs to be version-specific.

--Mark Storer
  Senior Software Engineer
  Autonomy Cardiff

import legalese.Disclaimer;
Disclaimer<Cardiff> discard = new Disclaimer<Cardiff>();
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to