Граф коммитов

4064 Коммитов

Автор SHA1 Сообщение Дата
tuchida f75125901e ref. #1112 Fix Array.from when called with a sparse array 2021-12-10 11:05:52 -08:00
tuchida dd2e3f1238 ref. #995 Do not convert java.math.BigInteger. 2021-12-10 10:37:20 -08:00
Paul Bakker b71183d75c Use javadoc.io instead of hosting it ourselves on our github pages 2021-12-10 10:13:10 -08:00
Gregory Brail f344ea9b19 Fix broken build from too many merges
Fix return type of getGetterOrSetter.
2021-12-09 19:05:00 -08:00
Gregory Brail 168d844b0f Restore old signature for getGetterOrSetter
This is technically a regression because we changed the signature
of a public method.
2021-12-09 17:03:37 -08:00
Gregory Brail 400230efb5 Restore old behavior of __lookupSetter__ with prototypes
Fix a regression that was causing a failure in the Kangax
compat-table. Fixes https://github.com/mozilla/rhino/issues/1114.
2021-12-09 17:02:44 -08:00
Gregory Brail 8c2401d86b Reformat LookupSetterTest 2021-12-09 17:02:44 -08:00
Ronald Brill 8df9101fc0 spotless 2021-12-10 00:59:38 +00:00
Ronald Brill 9a6343448a Fix regression in __proto__
Fix a regression in the handling of __proto__ of a
Function object.

Fixes https://github.com/mozilla/rhino/issues/1113

Also, fix some tests currently ignored
2021-12-10 00:57:55 +00:00
MaxisTekfield cfa48f5b4d Fix issue #1095. Fix some potential NPEs in Parser.java. 2021-12-09 13:34:19 -08:00
MaxisTekfield 7b5ff4511a Reformat Global.java for future modifications. 2021-12-09 12:15:17 -08:00
MaxisTekfield 2b9650af84 Remove redundant tag in javadoc. 2021-11-30 19:22:50 +00:00
Mario Cormier f447f4aa20 Fix invalid single quotes in French messages
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.
2021-11-29 16:46:10 -08:00
Gregory Brail cb8d5f0485 Switch versions back to SNAPSHOT while we wait for release 2021-11-18 14:09:32 -08:00
Gregory Brail 36ca61b481 Update files for 1.7.14 RC 1
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!
2021-11-18 14:00:40 -08:00
Carlos Amengual 3be1e38bf8 Exclude 'testsrc' and 'examples' from spotbugs on Windows systems (#1086) 2021-11-18 13:59:53 -08:00
Carlos Amengual 734dcfa5b6 Try setting superblock locals from an initialised exception handler (#915) 2021-11-18 13:58:11 -08:00
Greg Brail 2937a45dd3
Fix NPEs in a few places (#1073)
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
2021-11-01 12:11:57 -07:00
Gregory Brail 47691c491d Create a common utility for selecting optimization levels for tests. 2021-11-01 11:26:21 -07:00
Gregory Brail 754508a52b Add setTimeout and clearTimeout to the shell
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.
2021-11-01 11:26:21 -07:00
Gregory Brail 77b8632c76 Spotless reformatting. 2021-11-01 11:26:21 -07:00
tonygermano 3ceb7cfc95
Add English messages resource (#1001)
* Add English messages resource

* Reset default locale after tests
Renamed constants and tests
2021-10-31 20:57:40 +01:00
Carlos Amengual 2ae74e3ef8 Gradle: allow spotless in Java 17 CI & small nits
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).
2021-10-21 17:00:57 -07:00
Carlos Amengual c5387373f1 Replace Java 15 with 17 in CI 2021-10-18 14:14:33 -07:00
Carlos Amengual 6b02587a8d Account for BigInt in Hashtable (#1023)
Closes #1023
2021-10-18 14:13:54 -07:00
Ronald Brill f475d80791 spotless 2021-10-18 13:31:38 -07:00
Ronald Brill fef5eaa5c7 fix some warnings 2021-10-18 13:31:38 -07:00
Carlos Amengual 0fcfb09e93 Fix illegal reflective access to methods in unexported classes
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
2021-10-15 17:34:11 -07:00
Carlos Amengual fb9d937748 Update README with modularity information for Java 16+. 2021-10-15 17:03:09 -07:00
Carlos Amengual 73a2a001f0 Fix swing tests on modular JDKs (#1039). 2021-10-15 17:03:09 -07:00
Roland Praml d9c0e4014f spotless 2021-10-15 16:34:28 -07:00
Roland Praml edbd080987 Replace 'new Integer/Double/Long' by Integer/Double/Long.valueOf
This constructor is deprecated since Java 9
2021-10-15 16:34:04 -07:00
Roland Praml 43793a43e7 ADD: JavaDoc / using list.add if last element is added 2021-10-14 14:05:10 -07:00
Roland Praml f0ba830973 ADD: delete method and set length property to NativeJavaList 2021-10-14 14:05:10 -07:00
Carlos Amengual 1c727037a7 Upgrade deprecated Gradle configurations 2021-10-14 12:56:28 -07:00
Carlos Amengual f45ab167d7 Print a warning and disable 'spotless' tasks if Java version is greater than 15 and no workaround.
Closes #1036.

Add description of workaround to README
2021-10-08 16:58:10 -07:00
Carlos Amengual 88635ee5d4 Upgrade Gradle wrapper to version 7.2. 2021-10-08 16:57:47 -07:00
Gregory Brail 31d33fd802 Disable a very old flaky test 2021-10-08 16:52:13 -07:00
Roland Praml ed5f48da0a make spotbugs happy (SA_FIELD_DOUBLE_ASSIGNMENT of rawStackMapTop) 2021-10-08 12:38:48 -07:00
Roland Praml 6cd004714f spotless 2021-10-08 12:38:48 -07:00
Roland Praml 910ba7e142 Improve compile speed in some cases
* 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
2021-10-08 12:38:08 -07:00
Roland Praml 1b406da77c spotless 2021-10-08 12:24:56 -07:00
Gregory Brail 34057b67c9 Add support to track unhandled promise rejections
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.
2021-10-08 12:23:18 -07:00
Gregory Brail 9e6c85cfba Fix doc link 2021-10-08 12:17:00 -07:00
Gregory Brail 6c97ad6364 Move docs and compat table to new gh-pages location 2021-10-08 11:47:25 -07:00
Greg Brail 3970006e4d Set theme jekyll-theme-tactile 2021-10-08 11:27:12 -07:00
GrumpyCamel b073e31368 Update README.md
Link rot. Replaced with archive.
2021-09-29 09:45:52 +02:00
Roland Praml 68f68901fd spotless 2021-09-28 23:41:33 -07:00
Roland Praml bf7fa8e8b6 Avoid unnecessary arrayCopy in Kit.readStream, when initialBufferCapacity matches stream length. 2021-09-28 23:41:33 -07:00
Roland Praml cf58b9d8a7
Classcache must honor current security context. (#1019)
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>
2021-09-28 23:39:22 -07:00