When running in a French locale, some error messages are not very helpful as rogue single quotes prevent important pattern replacements elsewhere in the message.
This PR includes the changes necessary to publish RC 1, which I'd like
to do in a day or two. The release notes are cut and pasted from
p-bakker's excellent wiki. Thanks!
This fixes problems with null "this" parameters in:
Function.prototype.call
Function.prototype.apply
Function.prototype.toString
Object.prototype.toLocaleString
This addresses all but one of the NPEs in:
https://github.com/mozilla/rhino/issues/988
By having these in the shell, it allows tools like the "compat-table"
to run and properly test Promises. It's not part of the "Global"
object requires adding additional code to block for timer events, which
needs to be considered alongside other considerations in any project's
event loop.
The JVM arguments were not being found when CI was run with Java 17, leading to
spotless being unnecessarily disabled.
The spotless warning is now only printed when the 'check' task is executed, and
the plugin is only excluded from that task. Otherwise, the warning was appearing
when running unrelated tasks.
Also, a couple of small Gradle improvements are included (one removes a warning).
Fixes the kind of illegal reflective access described in issue #462.
Illegal reflective errors can also be caused by accessing non-public fields or
methods, but that kind of problem is unavoidable unless Rhino's core is
rewritten to avoid such accesses. A workaround is to use --add-opens, as
described in the README.
Create a JavaMembers_jdk11 class to deal with modular JDKs
* Use binary search for getSuperBlockFromOffset
* Remove obsolete method and code cleanup
* narrow lookup range for big exception tables
* Optimize finding locals
* TypeInfo.merge do simplest check first
This does nothing by default, but adds an object on the Context class
that tracks unhandled rejected promises and lets the user process them.
The shell now prints out warnings about unhandled rejections as it
runs and at the end of any executed script.
With this PR, the cache takes the current security context (in detail, the java.security.Permissions) into account when caching classes.
Co-authored-by: Roland Praml <roland.praml@foconis.de>
Co-authored-by: Roland Praml <pram@gmx.de>