Skip to content

Hard crash calling Context2d.prototype.filter #568

@tolmasky

Description

@tolmasky

This line will crash node:

Context2d.prototype.filter

Perhaps worse, so do this:

Object.getOwnPropertyDescriptor(Context2d.prototype, "filter")

I think this is because GetFilter doesn't have a HasInstance guard. I think it should do something along the lines of

if (!HasInstace(this)) return default_value

(as opposed to throwing, since then getOwnPropertyDesctipor would throw. This would match Array.prototype.length for example which is 0).

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