Skip to content

Question on the prototype used in BaseFunction.hasInstance(Scriptable instance) #1482

@RuralHunter

Description

@RuralHunter

Look the code of this line, it uses the [[Prototype]] of the function object as the prototype to check. According to this, should we use the prototype property instead? That is, maybe change the code like this:
Object protoProp = hasPrototypeProperty() ? getPrototypeProperty() : ScriptableObject.getProperty(this, "prototype");

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