-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ES2015 function name behavior #1297
Labels
bug
Issues considered a bug
Ecma Incompatibility
Issues about Rhino being incompatible with the EcmaScript spec
Milestone
Comments
p-bakker
added
the
Ecma Incompatibility
Issues about Rhino being incompatible with the EcmaScript spec
label
Jan 29, 2023
will provide a patch for bound functions - because this is simple to fix :-) |
rbri
added a commit
to rbri/rhino
that referenced
this issue
Jan 30, 2023
rbri
added a commit
that referenced
this issue
Feb 19, 2023
andreabergia
added a commit
to andreabergia/rhino
that referenced
this issue
Oct 20, 2023
andreabergia
added a commit
to andreabergia/rhino
that referenced
this issue
Oct 20, 2023
johnspackman
added a commit
to johnspackman/rhino
that referenced
this issue
Dec 25, 2023
…0917 * commit '6387bac4281ba1c4a8050cd055071615593d214c': (78 commits) More consistent test optimization levels (mozilla#1317) ci: set minimal permissions on GitHub Workflows Compare all primitive value type wrappers by value Fixing formatting issues Treat String, ConsString, Boolean, and Double as value types setter function (from property descriptor) has to convert the args (see HtmlUnit#7) also use try-with-resource FIX: Wrap key and value for NativeJavaMap iterator Added more tests FIX: Wrap result of iterator BUG: for X of javaList does not work properly in strict mode removed obsolete LineSeparator Spotless Preserving cause, when a JavaException is rethrown in JavaScript fix ScriptException when bound functions are called inside Promise.then() test cases from mozilla#1242 fix taken from p-bakker's sugestion fix name property for bound functions (see issue mozilla#1297) Fix the condition for isResourceChanged Code Cleanup (mozilla#1295) ignore %c styling but count to not disturb further replacements ... # Conflicts: # src/org/mozilla/javascript/NativeObject.java # testsrc/org/mozilla/javascript/tests/json/JsonParserTest.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Issues considered a bug
Ecma Incompatibility
Issues about Rhino being incompatible with the EcmaScript spec
ES2015 standardized the behavior of the function.name property. Rhino doesn't comply.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name, https://2ality.com/2015/09/function-names-es6.html for explanations of expected behavior. See https://tc39.es/ecma262/#sec-setfunctionname and everywhere in the spec where the abstract function operation setFunctionName is used to see the how and when
Debugger implementations would benefit from this, as they would be able to display more meaningful names on each entry in the callstack
Known issues:
Also see #715 for a related case
Some of the scenarios that we currently cannot cover, as they rely on features Rhino doesn't currently support:
let s = Symbol('someDescription'); ({[s]: () => {})[s].name
// to yield[someDescription]
Support ES2015 Computed Property Names #913The text was updated successfully, but these errors were encountered: