PageRenderTime 52ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/RELEASE-NOTES.md

http://github.com/mozilla/rhino
Markdown | 871 lines | 732 code | 139 blank | 0 comment | 0 complexity | 122a80130411a82e7e4f6cf9b954a8d6 MD5 | raw file
  1. # Rhino 1.7.13
  2. ## September 2, 2020
  3. ### Script Engine support
  4. Now that Nashorn has been deprecated, a number of people have asked about using
  5. Rhino with the standard Java "ScriptEngine" interface. This release supports that.
  6. However, in order to avoid breaking existing code, the script engine is
  7. shipped in a separate JAR. Use the "rhino-engine" jar along with the
  8. standard "rhino" jar to include this feature.
  9. ### Generator Support
  10. This release supports generators based on the ES6-standard "function *"
  11. syntaxt.
  12. ### Other important changes
  13. This release also includes a number of quality and consistency fixes from five contributors.
  14. As always, check out the [compatibility table](http://mozilla.github.io/rhino/compat/engines.html)
  15. to see where Rhino stands today.
  16. Gregory Brail (18):
  17. * Start on 1.7.13.
  18. * Add a build config for CircleCi.
  19. * Upgrade Gradle version to 6.5.
  20. * Update max workers.
  21. * Add support for ES6 generators.
  22. * Make "GeneratorFunction" pattern work in interpreted mode.
  23. * Complete implementation of GeneratorFunction.
  24. * Diagnostics to discover test timeouts.
  25. * Implement standard Java ScriptEngine
  26. * Change MozillaSuiteBenchmark to not fork threads.
  27. * Try to improve performance of MozillaSuiteTest
  28. * Disable some very slow tests
  29. * Start using JMH for benchmarks.
  30. * Many small fixes suggested by FindBugs and other linters
  31. * Turn off all the Mozilla tests that use the "BigO" function.
  32. * Move "BodyCodegen" into a file with the appropriate name.
  33. * Add feature flag for changes to Function.__proto__
  34. * Make __proto__ more closely match the spec
  35. Karl Tauber (2):
  36. * Debugger fixes for FlatLaf (https://github.com/JFormDesigner/FlatLaf): - make renderer tree row height same as table row height - increase monospaced font size in script source and evaluation view if L&F uses larger font - remove renderer tree border if L&F sets one (built in L&F do not)
  37. * Debugger: fix NPE in variables view when expanding "CallSite"
  38. Sylvain Jermini (7):
  39. * improve java.util.{List,Map} interop
  40. * travis: switch from trusty to xenial + set explicit -Xss in tests
  41. * try to fix circle, increase Xss
  42. * Fix failing string.trim.doctest in java11.
  43. * NativeDate: DateFormat, use explicit pattern, has the default has changed from java8 to 9. See https://stackoverflow.com/q/53317365
  44. * add java11 to travis test matrix
  45. * various fixes so the javadoc linter is happy
  46. hjx胡继续 (2):
  47. * Add String.fromCodePoint()
  48. * fromCharCode optimize
  49. ian4hu (5):
  50. * Add String.prototype.trimStart String.prototype.strimEnd
  51. * style: code style
  52. * test: string test with hex code instead of literal
  53. * remove unused StringBuilder
  54. * fix tests in test262/built-ins/String/fromCodePoint/*
  55. leela52452 (1):
  56. * fix OWASP Cheat Sheet markdown format
  57. RBRi (48):
  58. * switch value and done
  59. * make some method protected to support rhino-external implementations
  60. * NativeArrayBuffer slice() length is 2
  61. * fix String.indexOf and String.includes when searching for an empty st… (#747)
  62. * fix string.split with limit 0
  63. * fix for issue #665 (maybe we have to adjust the version switch to version 1_6)
  64. * fix for the recursion detection when converting an array into a string
  65. * fix #670
  66. * add testcase for issue #656
  67. * Symbol.length is 0 fixes #648
  68. * add testcase for issue #651
  69. * fix type o the expected value
  70. * improve seal() and freeze() processing; fixes #174
  71. * An error should be thrown when defining a property for a read-only variable in strict mode fixes 573
  72. * code cleanup
  73. * Do not save/share an instance of NativeArrayBuffer in a static variable. This introduces really strange side effects, because the instance is available (and changeable) from javascript code. These changes are 'persistent' in a way that starting a fresh rhino instance still uses this changed object.
  74. * various fixes for array calls using this pattern Array.prototype.foo.call(null, ....);
  75. * fix issue #648
  76. * fix Object.getOwnPropertyDescriptor for index properties on native strings
  77. * Function.__proto__ ignores write access
  78. * improved regexp parser based on commit 2164382abe078ea2024b9dff7fe416a78e3a668f from anba
  79. * fix handling of undefined parameter value in String.normalize()
  80. * it should not be possible to change the [[Prototype]] of a non-extensible object; some cleanup
  81. * add version guard
  82. * fix all this-value-not-obj-coercible.js tests for string
  83. * checkstyle fixes
  84. * fix test suite setup
  85. * use the RangeError construction helper
  86. * improved handling of negative ArrayBuffer size fixes #708
  87. * in ES6 TypedArray constructors are only callable via new
  88. * avoid some auto boxing use Double.valueOf instead of new some cleanup try to optimize the code a bit to avoid unnecessary conversations and Double object creation make some methods static
  89. * regular expressions are not functions in the context of string replace fixes #726
  90. * improved regex range handling
  91. * do not inherit strict mode when parsing a function body
  92. * code style fix
  93. * fix wrong start object for getter in Object.assign
  94. * use Undefined.isUndefined()
  95. * String.prototype[Symbol.iterator].call(undefined) has to throw because undefined is not coercible
  96. * enable more test cases
  97. * reduce auto boxing to be able to better control this and avoid boxing if possible
  98. * make a bunch of methods static
  99. * code cleanup
  100. * make the inner class static (this makes also SpotBugs happy)
  101. * Object.setPrototypeOf() arg[0] has to be coercible
  102. * fix one more case
  103. * match
  104. * search
  105. * throw if the lastIndex prop of an regex is readonly
  106. # Rhino 1.7.12
  107. ## January 13, 2020
  108. ### XML external entities disabled by default
  109. As of this release, Rhino makes "XML external entity injections" more difficult
  110. by disabling fetching of external DTDs and stylesheets by default,
  111. as recommended in the [OWASP Cheat Sheet](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.md).
  112. Even though this may break some existing projects, the fact that this
  113. vulnerability is in the OWASP top 10 makes it important enough to change
  114. the default.
  115. Developers who still need this old capability can re-enable it by setting the
  116. Context feature flag FEATURE_ENABLE_XML_SECURE_PARSING to false. (The default
  117. is true.)
  118. ### New JAR for embedding use cases
  119. This release also includes a second JAR artifact, "rhino-runtime.jar". This is
  120. simply the existing Rhino JAR with the "tools" source directory excluded.
  121. This directory includes the Rhino shell as well as the default "Global"
  122. object, which includes capabilities to load and process external source
  123. code.
  124. Since some automated source-scanning tools mark these capabilties as insecure,
  125. this new JAR provides a way to only include the parts of Rhino that embedders
  126. typically need without pulling in additional capabilities.
  127. Developers who typically embed "rhino.jar" might consider embedding "rhino-runtime.jar"
  128. instead if they do not need all this.
  129. Thanks to the following developers for the contributions below!
  130. Aditya Pal (1):
  131. * Fix syntax error for comments in array (#607)
  132. Chris Smith (1):
  133. * Adding secure configuration for XML parsers (#600)
  134. Gregory Brail (12):
  135. * Update versions for 1.7.12 release.
  136. * Fix a code generation bug for generators.
  137. * Fix "fall through" comment.
  138. * Fix static analysis around NaN values.
  139. * More isNaN fixes and one rounding bug.
  140. * Make XML processor configuration more robust.
  141. * Enable SpotBugs plugin.
  142. * Fix minor static analysis findings.
  143. * Increase Travis timeout.
  144. * Disable more flaky "BigO" tests.
  145. * Fix handling of "return" in iterators.
  146. * Undo setting some members "final".
  147. Ivan Di Francesco (1):
  148. * Fix warnings (#596)
  149. Roland Praml (2):
  150. * FIX: NativeJavaObject.getDefaultValue recognizes numbers correctly
  151. * #511 fixing InterfaceAdapter abstract name lookup.
  152. Stijn Kliemesch (7):
  153. * Private static method ScriptRuntime.enumInitOrder(Context,IdEnumeration) no longer expects given IdEnumeration's property obj to be of type ScriptableObject specifically, only of type SymbolScriptable.
  154. * Added testclass IterableTest to test iterable implementations, currently with one testcase for a host object, specifically one that uses Array Iterator.
  155. * Added more tests to IterableTest.
  156. * Fix for #616 (#617)
  157. * Fixes for calling several Object.prototype members.
  158. * Fixed dynamic scoping for implementations of Object.create and Object.defineProperties
  159. * Testcase for dynamic scoping and Object.create.
  160. nename0 (2):
  161. * Fix Array.include return a wrapped Boolean
  162. * implement Array.includes to align to specs
  163. RBRi (20):
  164. * fix for Map/Set working with ConsString as key also; closes #583
  165. * fix propertyIsEnumerable when using an index to access string; closes #582
  166. * ignore surplus search/match/replace parameters; closes #581
  167. * add support for setPrototypeOf
  168. * fixed imports
  169. * RangeError should be throw if the argument of Number.prototype.toFixed is less than 0 fixes #587
  170. * fix interpreter fallback when using streams (fixes #592)
  171. * Parser already always reads the reader into a string. Move this reader handling to the Context to be able to fall back to the interpreter in all cases.
  172. * fix imports
  173. * functions declared as var f = function f() {...} within a function should not impact higher scope variable with the same name
  174. * functions declared as var f = function f() {...} within a function should not impact higher scope variable with the same name
  175. * fix Boolean(document.all)
  176. * many more tests are passing already and some cleanup
  177. * add tests for built-ins/ThrowTypeError and built-ins/TypedArray
  178. * add tests for built-ins/TypedArrays
  179. * fix BYTES_PER_ELEMENT property
  180. * fix BYTES_PER_ELEMENT prototype property
  181. * fix TypedArray constructor arity
  182. * Fix issue with parseInt's handling of leading zeroes
  183. * #529 (#628)
  184. # Rhino 1.7.11
  185. ## May 30, 2019
  186. This release includes implementations of a number of missing JavaScript language features,
  187. including:
  188. * Improvement to the accuracy and reliability of the parser and its associated AST.
  189. * The Map, Set, WeakMap, and WeakSet classes.
  190. * More Array functions, including from, of, fill, keys, values, entries, and copyWithin.
  191. * Many more Math methods.
  192. * More Object functions, including seal and freeze.
  193. * Many other bug fixes, as shown below.
  194. In general, Rhino's philosophy for new features and changes is to
  195. follow the ECMAScript spec, but to use the "language version" on the Context class
  196. when backward compatibility would be broken.
  197. For example, the Array.prototype.concat function in older versions of Rhino would treat
  198. any input value as "spreadable" if it has the same constructor as Array. ECMAScript now says
  199. clearly that this should only happen if the "isConcatSpreadable" symbol is present. In
  200. this release, the old behavior is disable when the language level is at least the
  201. "ES6" level (Context.VERSION_ES6, or 200).
  202. Developers working on new code will be happier if they set the language level to
  203. CONTEXT.VERSION_ES6, or use the "-version 200" flag to the command line tool.
  204. A future release will change the default language version of the command line tool.
  205. This release contains contributions from 15 developers. Thanks for all your hard work!
  206. Attila Szegedi (7):
  207. * Improvements to MemberBox (#438)
  208. * Labmdify usages of ContextAction
  209. * Make ContextAction generic.
  210. * API for comparing continuation implementations
  211. * Algorithm for structural equality comparison of object graphs
  212. * Use structural equality as the equality algorithm for Interpreter.CallFrame, which serves as the NativeContinuation implementation.
  213. * Add workarounds for #437 and #449
  214. Dimitar Nestorov (1):
  215. * Update README.md
  216. Dirk Hogan (1):
  217. * 431 update expiry of cached commonjs entity if no change on filesystem
  218. Gregory Brail (18):
  219. * Prepare for next iteration.
  220. * Support replacing prototype functions of native objects.
  221. * Fix NullPointerException in __defineGetter__
  222. * Fix a problem with standard objects that have Symbols in their prototypes.
  223. * Implement the built-in Set and Map classes for ES6.
  224. * Add WeakMap and WeakSet on top of the Map and Set work.
  225. * Upgrade max heap for Gradle tests to 1 GB.
  226. * Test cases and a small fix for native arrays.
  227. * Implement @@isConcatSpreadable and make Java arrays spreadable
  228. * Code review comments for @@isConcatSpreadable.
  229. * Make the "Sorting" helper class a proper singleton.
  230. * Un-do recent addition to the Scriptable interface.
  231. * Update Gradle wrapper version.
  232. * Fix flag tests that assume Context is available.
  233. * Fix a parser bug with missing semicolon warnings.
  234. * Fix a regression introduced recently to MemberBox.
  235. * More compatibility fixes for Array.prototype.concat.
  236. * Work on Array.of, from, and copyWithin.
  237. * Fix a parsing regression.
  238. Igor Kuzmanenko (2):
  239. * fixes XmlMemberGet toSource implementation (#483)
  240. * fixes position for ParenthesizedExpression nodes (#129)
  241. Markus Sunela (1):
  242. * Add manual OSGi manifest
  243. Mozilla-GitHub-Standards (1):
  244. * Add Mozilla Code of Conduct file
  245. Nedelcho Delchev (1):
  246. * Update README.md
  247. RBRi (2):
  248. * some fixes/enhancements for the typed array support (#436)
  249. * Array fixes (#467)
  250. * fix all javadoc errors and all javadoc html warnings
  251. * method Global#version(xxx) should return the new version identifier if the version was updated
  252. * add more info to the error message
  253. * us the right method name if available
  254. * two minor improvements from HtmlUnit code * window list is sorted * Command 'Go to line' added
  255. * avoid npe if no file window is available
  256. * improve the design for flexible subclassing
  257. * remove duplicated check
  258. * fix the isSymbol detection to no longer detect the prototype as symbol
  259. * we have many more 262 tests passing already - i think we have to use as many tests as possible to check our quality
  260. * and some more; now we are at 51093
  261. * Use as many test262 tests as possible to check our quality
  262. * implement missing Math functions
  263. * disable some slow tests
  264. * Support for `arguments` object as TypedArray constructor argument this is the same as #297 but includes a simple test.
  265. * fix issue 437
  266. * use the system line separator for code generation
  267. * remove work around for 437
  268. * fix #449 also and remove the work around from EqualObjectGraphs
  269. * add @Override and some more cleanup
  270. * fix ctor called with date arg
  271. * valueOf has to be called without any args
  272. * fix remaining utc constructor case
  273. * minor cleanup
  274. * fix native array constructor called with null and same for the setter
  275. * code cleanup based on eclipse Photon suggestions
  276. * add more delegate methods to MemberBox; name all delegate method using the name of the delegated method
  277. * avoid star imports across the codebase
  278. * fall back to the interpreter if the byte code generation fails
  279. * fix serialization for NativeMap, NativeSet, NativeWeakMap, and NativeWeakSet
  280. * scope is only undefined in strict mode; fix special null entries for maps
  281. * more config cleanup - use files for excluding; again enable a bunch of tests already running
  282. * another VMBridge cleanup step (JDK 1.8 is the minimum at the moment)
  283. * another map fix
  284. * more detailed tests hack to dump already passing tests exclude one more class of tests more tests are passing
  285. * next try to make the travis build pass
  286. * array.fill
  287. * array.keys, array.entries, array.values
  288. * fixes for DataView, including enabling more test cases.
  289. * fix freeze/preventExtensions/seal/isFrozen/isExtensible/isSealed for ES6
  290. * add padStart and padEnd
  291. * make serialVersionUID private
  292. * make the test pass on my machine (also from inside eclipse)
  293. * fix null/undefined handling add first array includes impl
  294. * fix some array length handling border cases
  295. * NativeArray cleanup more error output for Test262SuiteTest
  296. * fix for #531 - using a symbol as array index crashes with a class cast exception
  297. * Update Jacoco version
  298. * functions are valid keys for WeakMap/WeakSet
  299. * use valueOf
  300. * cleanup vm bridge; since we are at java 8 there is no need to check for iterator availability
  301. * cleanup member; we are using the executable type instead of member
  302. * fix unused import
  303. * another jdk check no longer required
  304. * fix build
  305. * add (modified) test case from #135
  306. * first simple version of copyWithin
  307. * first array.of impl
  308. Raphaël Jakse (1):
  309. * Test function arity and length properties
  310. Ravi Kishore (1):
  311. * Retain of comments and their position in the actual code after parsing. (#465)
  312. Stijn Kliemesch (1):
  313. * Added testcase for #510
  314. Sébastien Doeraene (2):
  315. * Fix #448: Correctly wrap the result of Math.imul as an Int32.
  316. * Fix the conversions in typedarrays.Conversions.
  317. Travis Haagen (2):
  318. * Fix bug that caused modified JavaScript files to never be reloaded
  319. * Created UrlModuleSourceProviderTest
  320. nabice (2):
  321. * Fix #533 AstNode.setParent() causes a position error
  322. * test for #533
  323. raphj (1):
  324. * Override getArity
  325. stijnkliemesch (1):
  326. * Fixes Parser.throwStatement()
  327. # Rhino 1.7.10
  328. ## April 9, 2018
  329. This release fixes a regression introduced in version 1.7.7.2 that caused the
  330. "propertyIsEnumerable" to throw an exception when used with String and typed array objects,
  331. and possibly with custom user-written objects as well.
  332. [Issue 415](https://github.com/mozilla/rhino/issues/415)
  333. It contains a few other fixes:
  334. Attila Szegedi (2):
  335. * Make as many CallFrame fields as possible final, initialize them in constructor
  336. * frame.debuggerFrame != null || frame.idata.itsNeedActivation is identical to frame.useActivation.
  337. Jeremy Whitlock (1):
  338. * Missing properties are not enumerable when checking enumerability
  339. # Rhino 1.7.9
  340. ## March 15, 2018
  341. This release fixes a [potential ArrayIndexOutOfBoundsException](https://github.com/mozilla/rhino/issues/390)
  342. that was introduced in 1.7.8. Since it's potentially pretty serious, projects currently using 1.7.8
  343. should switch to this new release.
  344. [Issue 390](https://github.com/mozilla/rhino/issues/390)
  345. In addition, there is a new flag on Context called "FEATURE_INTEGER_WITHOUT_DECIMAL_PLACE."
  346. If set, Rhino will work harder to display numbers in integer form rather than in floating-point
  347. form. This feature is currently disabled by default, although if it proves popular than we can
  348. consider enabling it in the future.
  349. [PR 398](https://github.com/mozilla/rhino/pull/398)
  350. At language level "ES6" and above, ToNumber conversion is now more compliant to the spec. (This
  351. change is disabled for older language levels to prevent a problem with backward compatibility.)
  352. [PR 383](https://github.com/mozilla/rhino/pull/383)
  353. Finally, there are a number of other fixes.
  354. Thanks to all who contributed, both with issues and with code!
  355. Attila Szegedi:
  356. * Fix a JavaDoc warning
  357. Ivan Vyshnevskyi:
  358. * Make ToNumber(String) conversion more spec-compliant
  359. * Report parsing error for default values in destructuring assignments
  360. Michael[tm] Smith:
  361. * Add addError(String messageId, int c) method
  362. * Add “illegal character” test to ParserTest
  363. * Show word in “identifier is a reserved word” error
  364. * Add “identifier is a reserved word” test
  365. Oleksandr Maksymenko:
  366. * changes to process integer object as integer and long as long, not as double
  367. RBRi:
  368. * cleanup the code an try to make it faster (#373)
  369. jhertel:
  370. * Correction: Compatability → Compatibility
  371. # Rhino 1.7.8
  372. ## January 22, 2018
  373. Most important changes in this release:
  374. * JavaScript objects are no longer (somewhat) thread-safe by default
  375. * Rhino is resistant to "hash flooding" attacks
  376. * Rhino is only supported for Java 8 and up
  377. * Rhino only builds with Gradle.
  378. The primary change in this release is that the object storage format has changed
  379. for objects derived from ScriptableObject (which is nearly all objects).
  380. First, objects are no longer thread-safe by default. (They were thread-safe previously, but
  381. not in a way that we could prove was 100 percent correct in all cases.) We do not believe
  382. that the vast majority of Rhino code depended on this capability.
  383. The feature flag Context.FEATURE_THREAD_SAFE_OBJECTS may be used to enable locking on all
  384. objects by default in case it is needed. Furthermore, the built-in "sync" function is still
  385. supported, which can be used to wrap a function in a similar way to the "synchronized" keyword
  386. in Java.
  387. Second, when an object grows to a large number of properties, the native hash table implementation
  388. is replaced with java.util.HashMap. This more complex (but slightly slower) hash implementation
  389. is resistant to hash collisions. This makes Rhino in general resistant to "hash flooding" attacks.
  390. Rhino now depends on Java 8. It also works on Java 9, although a few tests are currently breaking
  391. around Date parsing and UTF-8 encoding.
  392. Additional changes:
  393. [Issue 290](https://github.com/mozilla/rhino/issues/290) Resist hash flooding attacks
  394. [Issue 303](https://github.com/mozilla/rhino/issues/303) Arrow function position set error
  395. [Issue 323](https://github.com/mozilla/rhino/issues/323) Possible OutOfMemory due to
  396. infinite loop on parsing
  397. [Issue 341](https://github.com/mozilla/rhino/issues/341) Objects are only thread-safe when
  398. feature is enabled
  399. [Issue 351](https://github.com/mozilla/rhino/issues/351) Function-level use-strict breaks
  400. backward compatibility
  401. [Issue 357](https://github.com/mozilla/rhino/issues/357) Array.sort() can throw
  402. ArrayIndexOutOfBoundsException
  403. [Issue 295](https://github.com/mozilla/rhino/issues/295) Change WrapFactory to only wrap
  404. "true" primitive types and not subclasses.
  405. [Issue 377](https://github.com/mozilla/rhino/issues/377) Context initialization in
  406. "sealed" mode failed for ES6 language level.
  407. [PR102](https://github.com/mozilla/rhino/pull/102) Fix regexp parsing for "/0{0/"
  408. [PR108](https://github.com/mozilla/rhino/pull/108) Attach jsdoc nodes to function params.
  409. [PR 169](https://github.com/mozilla/rhino/pull/169) Enable calling default method
  410. on Java 8.
  411. [PR322](https://github.com/mozilla/rhino/pull/322) Fix static array functions
  412. [PR353](https://github.com/mozilla/rhino/pull/353) Member box call error.
  413. [PR355](https://github.com/mozilla/rhino/pull/358) Support array-like parameters to
  414. Function.prototype.apply().
  415. [PR372](https://github.com/mozilla/rhino/pull/372) Improve test262 integration and enable
  416. many more tests.
  417. # Rhino 1.7.7.2
  418. ## August 24, 2017
  419. This release contains fixes for a few important bugs that have caught Rhino users out in the
  420. field.
  421. * Do not throw a Java exception from array.prototype.sort() no matter how weird the user-supplied
  422. comparator function is. This is a major difference between JavaScript and Java and has caused
  423. us to avoid using "Arrays.sort" on JavaScript arrays.
  424. * Fix incorrect offsets in the "DataView" class.
  425. It also includes several other fixes:
  426. * Always append a column number to V8-style stack traces. (Unfortunately it is always "0".)
  427. * Support Object.is and Object.assign.
  428. * Make the Symbol implementation match the spec (for VERSION_ES6 and up only).
  429. * Avoid throwing internal Java exceptions for certain native objects in "toJSON".
  430. * Allow subclassing of ContinuationPending.
  431. * For VERSION_ES6 and up, sort properties in the spec-defined order (int property names
  432. first).
  433. * Fix stack overflow in string concatenation.
  434. * Improve performance of ConsString.toString
  435. The next release is likely to be 1.7.8.
  436. # Rhino 1.7.7.1
  437. ## February 2, 2016
  438. This release fixes a few critical bugs that were affecting code in the field:
  439. * Improve String.prototype.repeat to work more efficiently and to not overflow
  440. * Fix CallSite.isNative() and isTopLevel() so that they do not throw fatal errors
  441. * Replace the implementation of the "YearFromTime" internal method for the Date class to avoid large CPU loops
  442. Specific Changes:
  443. * Formatting issue with SourceReader.
  444. * Fix CallSite.isNative() and isTopLevel() to not throw.
  445. * Make String.prototype.repeat not overflow for large values, and change code style a bit.
  446. * Add tests from 1.7.7.
  447. * Add Gradle code from 1.7.7.
  448. * Replace YearFromTime with code from jsdate.cpp to avoid long CPU loops.
  449. # Rhino 1.7.7
  450. ## June 17, 2015
  451. Major changes in this release:
  452. [Release 1.7.7](https://github.com/mozilla/rhino/issues?q=milestone%3A%22Release+1.7.7%22+is%3Aclosed)
  453. Specific changes:
  454. * [Issue 202](https://github.com/mozilla/rhino/issues/202) Initial support for ECMA Script 6 "method definitions".
  455. * [Issue 201](https://github.com/mozilla/rhino/issues/201) Make sure that all native Error instances can be converted
  456. to JSON.
  457. * [Issue 184](https://github.com/mozilla/rhino/issues/184) Fix compile encoding errors.
  458. * [Issue 178](https://github.com/mozilla/rhino/issues/178) Support build using Gradle (build using Ant is still
  459. supported but will be removed in a future release.)
  460. * [Issue 176](https://github.com/mozilla/rhino/issues/176) Add ScriptRuntime.throwCustomError to make it easier
  461. to re-throw Java exceptions
  462. * [Issue 166](https://github.com/mozilla/rhino/issues/166) Support many ES6 additions to the Math class.
  463. * [Issue 165](https://github.com/mozilla/rhino/issues/165) Support many ES6 additions to the Number class.
  464. * [Issue 163](https://github.com/mozilla/rhino/issues/163) Support ES6 additions to the String class.
  465. Thanks to everyone who contributed!
  466. Ahmed Ashour (3):
  467. * Add .gitattributes for End-Of-Line automatic handling
  468. * Remove extra space
  469. * Update .gitignore for eclipse generated files.
  470. Evgeny Shepelyuk (45):
  471. * Implementing possibility of writing JS tests code inside JUnit Test.
  472. * + gradle wrapper + sources and test compilation + jar building
  473. * + More JUnit style for Gradle compatibility - disabled test removed
  474. * + running tests
  475. * + benchmark test changes for Gradle compaibility + run benchmark from Gradle + publishing artifacts from Gradle
  476. * + benchmark test changes for Gradle compaibility + run benchmark from Gradle + publishing artifacts from Gradle
  477. * + publishing artifacts to maven compatible repositories
  478. * + releasing with Gradle
  479. * + releasing with Gradle
  480. * + releasing with Gradle
  481. * + releasing with Gradle
  482. * [Gradle Release Plugin] - new version commit: '1.7.8'.
  483. * + releasing with Gradle
  484. * + releasing with Gradle
  485. * + releasing with Gradle
  486. * [Gradle Release Plugin] - pre tag commit: '1.7.8'.
  487. * Revert "+ publishing artifacts to maven compatible repositories"
  488. * rollback gradle release
  489. * + properly populating manifest + exclude unnecesary files from jar
  490. * + adding license to jar
  491. * + build will not fail when maven credentials are not defined
  492. * + getting rhino display version from MANIFEST
  493. * * modifying README with Gradle details
  494. * Update README.md
  495. * Improving reporting of MozillaSuiteTest tests
  496. * Improving reporting of MozillaSuiteTest tests
  497. * + initial implementation of String.prototype.includes
  498. * + initial implementation of String.prototype.includes
  499. * + initial implementation of String.prototype.includes
  500. * + initial implementation of String.prototype.startsWith
  501. * + initial implementation of String.prototype.startsWith
  502. * + initial implementation of String.prototype.endsWith
  503. * + initial implementation of String.prototype.endsWith
  504. * + initial implementation of String.prototype.endsWith
  505. * + implementation of String.prototype.normalize
  506. * + implementation of String.prototype.normalize
  507. * + implementation of String.prototype.normalize
  508. * + implementation of String.prototype.repeat
  509. * + implementation of String.prototype.repeat
  510. * + implementation of String.prototype.codePointAt
  511. * + implementation of String.prototype.codePointAt
  512. * * fixing tests after implementation of ES6 string methods + implementing RequireObjectCoercible from ECMA spec
  513. * * fixing tests after implementation of ES6 string methods + implementing RequireObjectCoercible from ECMA spec
  514. * * fixing tests after implementation of ES6 string methods + implementing RequireObjectCoercible from ECMA spec
  515. * Better exception reporting
  516. Gregory Brail (16):
  517. * Update for new development iteration.
  518. * Read manifest URLs in a loop until we find the right one when trying to determine the implementation version.
  519. * Permissions fix.
  520. * Fix potential NPE in ComplianceTest.
  521. * Re-run IDMap on NativeString.
  522. * Merge branch 'issue_176_2' of https://github.com/raimi/rhino into raimi-issue_176_2
  523. * Merge branch 'master' of https://github.com/asashour/rhino into asashour-master
  524. * Add .gitattributes.
  525. * Re-arrange "global variables" regression tests for fewer spurious failures under Gradle.
  526. * Don't make "javaException" and "rhinoException" on the NativeError object enumerable, because they cannot be converted to JSON.
  527. * Fix file name for V8 benchmark results.
  528. * Add some ES6 methods to Math and Number.
  529. * "BigO" regression test exhibits different and inconsistent behavior on Java 8. So fix it.
  530. * Fix a bug in Math.hypot().
  531. * Added a constant for ECMAScript 6 language level: Context.VERSION_ES6.
  532. * Add "readline" and "write" to console.
  533. Raimund Jacob (5):
  534. * Allow throwing arbitrary objects from java world
  535. * 176: Adjust javadoc to reality.
  536. * Emacs, sorry
  537. * Issue176: Test infrastructure
  538. * 176: Actually Working Tests
  539. sainaen (1):
  540. * Print exception message in case of JavaScriptException in ScriptTestsBase
  541. tntim96 (1):
  542. * Fix Test compile encoding error 'unmappable character for encoding ASCII' - https://github.com/mozilla/rhino/issues/184
  543. uchida_t (5):
  544. * set capacity for StringBuilder in String#repeat
  545. * Implement ES6 MethodDefinition
  546. * `set` and `get` is valid method name.
  547. * NumericLiteral/StringLiteral is valid method name.
  548. # Rhino 1.7.6
  549. ## April 15, 2015
  550. Merged many of the outstanding pull requests in the GitHub repo.
  551. High-level changes include the following:
  552. * Many compatibility fixes for Date, Array, String, and others (André Bargull)
  553. * Array.find() and findIndex() (Evgeny Shepelyuk)
  554. * String.trimLeft() and trimRight() (Travis Ennis)
  555. * AST and "toSource" fixes (tntim96)
  556. * Support for V8 Error extensions, including Error.captureStackTrace (Greg Brail)
  557. * Support for typed arrays (Greg Brail)
  558. * Support for attaching "external data" as the indexed properties of any object (Greg Brail)
  559. André Bargull (60):
  560. * NativeDate: Date.length and Date.UTC.length is 7
  561. * NativeDate: Fix bug 732779 (Date.prototype.setXXX functions don't evaluate all parameters)
  562. * NativeDate: Date.prototype.toJSON uses [[GET]] to obtain the "toISOString" property
  563. * add js_toISOString method to format date values in ISO-8601 Extended Format with expanded year representation if necessary
  564. * NativeDate: Update Date.parse to support simplified ISO 8601 Extended Format [15.9.1.15]
  565. * Fix indentation in NativeDate.java
  566. * NativeError: Error.prototype.name and Error.prototype.message are not enumerable
  567. * NativeError: 15.11.2.1 and 15.11.4.4 updates
  568. * Arguments: arguments object should not have its own 'constructor' property, instead it inherits 'constructor' through its prototype
  569. * Arguments: 'callee', 'caller' and 'length' properties can be redefined for the arguments object
  570. * BaseFunction: Function.prototype.toString arity is 0
  571. * BaseFunction: The 'prototype' property on function instances can be redefined
  572. * BaseFunction: The 'arguments' property can be redefined for function instances
  573. * NativeArray: Check [[Extensible]] flag for dense-array case in [[Put]]
  574. * NativeArray: Remove (invalid) round-trips to ScriptRuntime when getting/setting elements
  575. * NativeArray: Follow spec more closely for Array.isArray and Array.prototype.concat
  576. * NativeArray: Array.prototype.{indexOf, lastIndexOf} bug fixes
  577. * NativeArray: Array.prototype.sort bug fixes (bug 728286)
  578. * NativeArray: Multiple changes to ensure specification algorithms are followed more closely
  579. * TopLevel,NativeGlobal,ScriptRuntime: Add cache for native error objects
  580. * NativeNumber: Handle case when precision is Infinity for Number.prototype.{toFixed,toExponential,toPrecision}
  581. * NativeObject: Object.prototype.toLocaleString uses [[Get]] to retrieve 'toString' property
  582. * NativeObject: Handle undefined arguments in Object.prototype.{hasOwnProperty,propertyIsEnumerable}
  583. * NativeString: String.prototype.replace arity is 2 instead of 1
  584. * NativeString: Handle undefined arguments in String.prototype.slice
  585. * ScriptRuntime: Fix range check to follow spec in numberToString()
  586. * ScriptRuntime: Set-up proto and parent-scope for TypeErrorThrower function
  587. * ScriptableObject: Object.defineProperties needs to make sure to call [[Get]] exactly once for each property entry
  588. * NativeRegExp: Handle undefined arguments in compile and exec
  589. * NativeRegExp: Report error if a RegExp flag is used more than once
  590. * NativeRegExp: RegExp.prototype.compile arity is 2
  591. * NativeRegExp: RegExp.prototype.lastIndex is lazily evaluated and may be set to non-writable as well
  592. * NativeRegExpCtor: arity of RegExp constructor is 2
  593. * NativeRegExpCtor: RegExp.prototype.{multiline,star,input,underscore} properties can be re-defined
  594. * RegExpImpl: Multiple changes for String.prototype.{match,search,replace,split}
  595. * Remove obsolete test case js1_2/function/regexparg-2-n.js
  596. * update test case doctests/arguments.doctest now that the arguments object inherits the 'constructor' property through its prototype
  597. * NativeRegExp: Make octal escape sequences match web reality
  598. * RegExpImpl: String.prototype.split with separator=undefined no longer treated as separator='undefined'
  599. * Fix indentation
  600. * Context: remove duplicate code in Context#newObject()
  601. * Context: Use StackTraceElement API to traverse stack-trace
  602. * NativeArray: address review comment from hns
  603. * Updated tests files per instructions in o.m.j.tests.MozillaSuiteTest
  604. * Patch for Bug 783797 ("Function calls across multiple global scopes are not handled properly")
  605. * Silence warnings in ClassFileWriter
  606. * Add missing @Deprecated annotations
  607. * Add missing @Override annotations
  608. * Add missing generic type info to deprecatedsrc/
  609. * Add missing generic type info to toolsrc/
  610. * Add missing generic type info to testsrc/
  611. * Add missing generic type info to src/
  612. * Fix invalid JavaDoc links
  613. * Replace StringBuffer with StringBuilder if possible
  614. * Address review comments from hns
  615. * Generators save and later restore the current stack when processing the 'yield' operation. Our current implementation for restoring the stack unfortunately confuses the Java classfile verifier, so at class load time a VerifierError is thrown. This happens because the verifier can no longer ensure that the proper types are placed on the stack, since the stack-state is saved in a simple Object[]. Re-ordering a few operations is only necessary so the verifier will again accept the generated class. But this is only done for generators because it creates slightly less efficient code compared to the standard case.
  616. * Add doctest and update comments with proper bug number
  617. * Patch for Bug 782363 ("Increment/Decrement alters const variables")
  618. * Patch for Bug 780458 ("Math.IEEEremainder makes ToInt32 slow for non-integer values") (V8):
  619. * Patch for Bug 789277 ("JSC: "missing ; after statement" message prints out for the line after the problem one")
  620. C. Scott Ananian (1):
  621. * Don't swallow empty lines in doctest; split lines on Mac/Windows/Unix.
  622. Edison (2):
  623. * Add working directory support to "runCommand"
  624. * Add working directory support to "runCommand"
  625. Elliott Baron (1):
  626. * Add manpage for Rhino shell.
  627. Evgeny Shepelyuk (2):
  628. * find and findIndex initial impl
  629. * Improving test framework + one JUnit class = one JS suite + reporting JS stacktrace on error + load function is available in JS + separate file for JS assertions
  630. Gregory Brail (31):
  631. * Update versions for next iteration.
  632. * Update README for release notes.
  633. * Change benchmark output so we can "plot" it in Maven.
  634. * Fix code cleanup fix that broke the Java 6 build.
  635. * Fix benchmark output file format again.
  636. * Re-run ID map on NativeString.
  637. * Manually add .gitignore additions from @sghill.
  638. * Added a bit more to the README including content from @shirishp
  639. * Add a NOTICE with the V8 copyright message.
  640. * Move anba's new DoubleConversion code into the package with the rest of the code derived from V8.
  641. * Remove retrotranslator code to generate 1.4-compatible bytecode. Switch bytecode generation to Java 6.
  642. * Remove code and build artifacts pointing to the "old E4X" implementation, based on XML Beans.
  643. * Remove unused XML beans-based E4X implementation.
  644. * One last vestige of XML Beans.
  645. * Re-generate ID map on NativeArray.
  646. * Initial checkin of typed arrays and tests from V8. Fix bad capitalization.
  647. * Fix some integer encoding and add more test cases.
  648. * Switch typed array tests to use Evgeny's framework for running them. Make them work only with version 1.8.
  649. * Make typed arrays only appear in 1.8.
  650. * Add List implementation for all native arrays.
  651. * Add "Error" to the set of standard Error constructors that could go down the new code path to create an error.
  652. * Complete List implementation for typed arrays. Write typed array unit tests for the List implementation.
  653. * Do not double-initialize Error.
  654. * Make loading of typed array classes lazy. Rename Java classes so that the names are more consistent.
  655. * Support for V8-style stack trace support: Error.prepareStackTrace Error.captureStackTrace Error.stackTraceLimit And "V8" format stack traces.
  656. * Improve efficiency of NativeError via pre-cached Method objects and reduced number of default fields.
  657. * Make "stack" non-enumerable until generated.
  658. * Add "setExternalArrayData" to ScriptableObject to allow array data to be stored outside the core object.
  659. * Set default version in shell to "180".
  660. * Add method to both get and set external array data.
  661. * Add "initSafeStandardObjects" to create standard objects with no Java class access whatsoever.
  662. Ievgenii.Shepeliuk (2):
  663. * `findIndex' implementation
  664. * more V8 compatibility
  665. Raymond Auge (1):
  666. * rhino exits the JVM even when run as a subshell of another java shell - bug-835147
  667. Travis Ennis (2):
  668. * Added the Javascript 1.8 String methods trimLeft and trim Right.
  669. * Added the Javascript 1.8 String methods trimLeft and trimRight.
  670. sainaen (1):
  671. * Add 'LanguageVersion' annotation. Make 1.8 default version for 'ScriptsTestsBase'
  672. sghill (1):
  673. * removing old .cvsignore files
  674. tntim96 (5):
  675. * 'undefined' pattern should be treated as empty string in RegExp constructor http://www.ecma-international.org/ecma-262/5.1/#sec-15.10.4.1 https://sourceforge.net/p/htmlunit/bugs/1599/
  676. * Bug 798642. AST 'toSource' on getter/setter mistakenly adding 'function' keyword https://bugzilla.mozilla.org/show_bug.cgi?id=798642
  677. * Bug 800616. Fix AST 'toSource' for Octal and Hexadecimal literals https://bugzilla.mozilla.org/show_bug.cgi?id=800616
  678. * Fix AST empty switch to source
  679. * Fix compile encoding error 'unmappable character for encoding ASCII'
  680. # Rhino 1.7R5
  681. ## January 29, 2015
  682. André Bargull (24):
  683. * Add missing license header to DefineClassMapInheritance.java
  684. * Remove invalid UTF-8 encoded unicode replacement characters (EF BF BD)
  685. * Add missing entries
  686. * Bug 772011: Decompiler does not add curly brackets for labelled statements
  687. * Add fix for bug-772833 (comment copied over from Parser::condExpr1 in frontend/Parser.cpp)
  688. * Fix bug 686806: - trailing commas aren't allowed in object/array literals per JSON spec - avoid using Integer.parseInt() to parse unicode escape sequences since parseInt() also accepts non-ASCII digits - also avoid using Character.isDigit() in readNumber() for the very same reason - readString() always created a StringBuilder instance to collect the input data, obviously this is actually only necessary when the input contains escaped characters. Therefore I've changed readString() to take the same approach as used in jsonparser.cpp - the JSON number specification is stricter than Double.parseDouble(), for example Double.parseDouble() accepts the input string '10.'. To ensure only valid JSON number literals are passed to Double.parseDouble(), readNumber() was refactored to perform the necessary input validation.
  689. * Patch for bug 774083.
  690. * Patch for Bug 688023:
  691. * Fix broken test cases which relied on the old (and erroneous) toSource() output
  692. * Patch bug 685403
  693. * Patch for bug 637811:
  694. * Fix bug 773573: Search for first curly bracket after closing parentheses to take account of object destructuring parameters
  695. * Simple doctest for bug 773573
  696. * Array.prototype.sort performed an unchecked cast from long to int without any overflow checks, this may result in a negative length which then throws a NegativeArraySizeException in Java, cf. js1_5/Array/regress-157652.js . A similar problem was found in NativeJSON, so I've handled that as well
  697. * Add explicit cast to int to ensure previous behaviour is retained
  698. * Calls must not be special-calls and reference-calls at the same time, cf. js1_5/Regress/regress-319391.js for a test case
  699. * Enable js1_5/Regress/regress-319391.js for MozillaSuiteTest
  700. * Patch for Bug 728286
  701. * Add test case
  702. * Patch for Bug 778549
  703. * Add missing overflow detection when processing RegExp character class pattern
  704. * Patch for Bug 780147:
  705. * Patch for Bug 608235 ("Incorrect error message for undefined[undefined]")
  706. * Patch for Bug 784358 ("Defining const variable within eval() throws redeclaration error")
  707. Evgeny Shepelyuk (1):
  708. * fix xmlbeans url
  709. Gregory Brail (10):
  710. * Add JUnit-based benchmarks that we can automate in Jenkins.
  711. * Extract zipped-up tests into a directory and check them in that way.
  712. * Extracted the stuff that was formerly in testsrc/tests.tar.gz.
  713. * Add XML output for EMMA coverage reports.
  714. * Fix character encoding tests to work on Mac.
  715. * Add output to benchmarks that can work with the Jenkins "Measurement Plots" plugin. This replaces the former output from the "SunSpider" and "V8" benchmarks.
  716. * Add files for Maven deployment.
  717. * README update.
  718. * Update README for other tests.
  719. * Fix E4X test 13.4.4.24 which was failing on Java 8 due to different HashMap iteration ordering.
  720. Hannes Wallnoefer (8):
  721. * Unwrap Synchronizer in BaseFunction.toSource().
  722. * Override ScriptableObject.isEmpty in NativeArray
  723. * Reduce concurrency level / memory footprint in concurrent class cache hash maps
  724. * Return null for unhandled JavaAdapter methods
  725. * Make JavaAdapter work with abstract base classes and protected constructors
  726. * Change build version to 1_7R5pre
  727. * Extract code to create JS error from Java exception into separate ScriptRuntime method
  728. * Reduce invocation magic in ShellConsole JLine support classes
  729. Kyle Cronin (2):
  730. * Patch for Bug 827538
  731. * Patch for Bug 738388
  732. <!--- Start with " git shortlog --no-merges Rhino1_7R4_RELEASE.. | sed 's/^ /*/'" -->