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

[TIMOB-24383] Make sure to use correct prototype for existing wrappers (2_1_X) #158

Merged
merged 1 commit into from Apr 19, 2017

Conversation

janvennemann
Copy link
Contributor

@janvennemann janvennemann commented Apr 18, 2017

JIRA: https://jira.appcelerator.org/browse/TIMOB-24383

A wrapper object is stored with the prototype it was first created with. Under certain use cases it can happen that the wrapper for a pointer is generated for a less specific type in the inheritance chain like NSObject. All further access to that wrapper would then use the NSObject prototype even if casted to their specific type, rendering all methods and properties from the specific wrapper implementation unusable. This commit fixes that by making sure to always set the correct prototype before returning an existing wrapper instance.

A wrapper object is stored with the prototype it was first created with. Under certain use cases it can happen that the wrapper for a pointer is generated for a less specific type in the inheritance chain like NSObject. All further access to that wrapper would then use the NSObject prototype even if casted to their specific type, rendering all methods and properties from the specific wrapper implementation unusable. This commit fixes that by making sure to always set the correct prototype before returning an existing wrapper instance.
@hansemannn hansemannn merged commit ac7c1d3 into tidev:2_1_X Apr 19, 2017
@hansemannn
Copy link
Contributor

@janvennemann Can you update the Hyperloop Beta release with the latest version? I'll check which tickets are included then.

@janvennemann
Copy link
Contributor Author

@hansemannn I'll wait till #160 is merged and then draft a new release. Are you ok with that?

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.

None yet

2 participants