This repository was archived by the owner on Jan 25, 2022. It is now read-only.
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
%ThrowTypeError%.toString() is not clearly defined #14
Closed
Description
The Function.prototype.toString() definition says:
- If func is (...) a built-in Function object, etc. (...) Additionally, if func is a Well-known Intrinsic Object, the portion of the returned String that would be matched by BindingIdentifier must be the initial value of the name property of func.
However, the intrinsic %ThrowTypeError% is anonymous, and ECMA262 requires the name property only for non-anonymous built-in functions (Section 17)
In implementation reality, the name property of %ThrowTypeError% varies between undefined (Chakra) and "" (SM, V8, JSC).
Possible fix: use anonymous in place of the name for anonymous function.
Metadata
Metadata
Assignees
Labels
No labels