Skip to content

Validate ptr #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2018
Merged

Validate ptr #273

merged 2 commits into from
Jun 19, 2018

Conversation

FreeMasen
Copy link
Contributor

To address #30

This adds a check to make sure that this.ptr is not 0 for all methods on a class as well as any functions that consume a Rust struct as an argument.

@FreeMasen FreeMasen force-pushed the validate-ptr branch 2 times, most recently from 78fdc76 to 749ac65 Compare June 18, 2018 02:38
Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes themselves look good, but I think we should also have a test that attempts to call a method after move from JS and assert that we get the expected error.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FreeMasen ! Sorry for the delay, I somehow missed the new commits pushed email.

@fitzgen fitzgen merged commit 5eda550 into rustwasm:master Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants