Skip to content
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
@claudepache

Description

@claudepache

The Function.prototype.toString() definition says:

  1. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions