Skip to content

Segfault when calling a method when this is null  #106

@jcmonnin

Description

@jcmonnin

See test case: jcmonnin/v8pp@8c9db45

When this doesn't reference the actual instance, v8pp resolves the unwarp to a nullptr and then calls the method on the null pointer which causes a segfault.

The script shouldn't be able to crash the host application, so I think there should be a runtime check that results in a JavaScript error.

Let me know if you prefer to have a full patch proposal instead of just this incomplete test case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions