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-23744] Android: Crash using Ti.Android.R values #8195

Merged
merged 1 commit into from Aug 10, 2016

Conversation

sgtcoolguy
Copy link
Contributor

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

Description:
Proxies using "interceptors" on the latest V8 were broken (i.e. The Ti.Android.R proxy). When internally adding our _properties object to the object it would trigger some callbacks to happen that we tried to get all the properties on the object before it was all initialized. I modified the ordering of when we wrap the JS object in C++ and when we define _properties. I also added in a null check to the interceptor C++ code, so that if we try to get a property handled by the interceptor and we haven't initialized the Java object in the JVM, then we'll return undefined for the time being.

This bug fix eliminates the crash seen before when simply adding a reference to Ti.Android.R.anim to your app.js file.

It'd be good to do more thorough testing to be sure that proxy works as intended, i.e. doesn't always give back undefined for values and gives us back values we expect...

@sgtcoolguy sgtcoolguy added this to the 6.0.0 milestone Aug 8, 2016
@sgtcoolguy
Copy link
Contributor Author

@farfromrefug
Copy link
Contributor

this fixes it for me

@sgtcoolguy sgtcoolguy merged commit 63d9916 into tidev:6_0_X Aug 10, 2016
@sgtcoolguy sgtcoolguy deleted the TIMOB-23744 branch August 10, 2016 13:08
@sgtcoolguy
Copy link
Contributor Author

Awesome, thanks for testing it @farfromrefug !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants