This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
%ThrowTypeError%.toString() is not clearly defined #14
Comments
... or maybe the requirement should be only for non-anonymous well-known intrinsic objects. |
I think we should just make it an invariant that all well-known intrinsics that are functions be given names. Basically, add
to 9.2.7.1. I'll open a PR. |
By the way @claudepache, how did you get a reference to this intrinsic in order to observe its name? |
michaelficarra
added a commit
that referenced
this issue
Sep 28, 2016
var ThrowTypeError = (function() { "use strict"; return Object.getOwnPropertyDescriptor(arguments, "callee").get })() |
michaelficarra
added a commit
that referenced
this issue
Sep 28, 2016
michaelficarra
added a commit
that referenced
this issue
Sep 29, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The Function.prototype.toString() definition says:
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.
The text was updated successfully, but these errors were encountered: