Open p-bakker opened 1 year ago
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
[someDescription]
will provide a patch for bound functions - because this is simple to fix :-)
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]
#913