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-23745] Android: Crash using Math.random #8196

Merged
merged 1 commit into from Aug 10, 2016

Conversation

sgtcoolguy
Copy link
Contributor

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

Description:
Calling Math.random() in JS code, like so:

console.log(Math.random());

Would crash against Titanium SDK 6.0+ on Android.

The culprit was a local reference/instantiation of a V8 ArrayBufferAllocator. I needed to move the definition of the allocator up into the global scope so it wouldn't get GC'd in C++ when the V8Runtime.nativeInit finished.

@farfromrefug
Copy link
Contributor

awesome job can't wait to test it!

@farfromrefug
Copy link
Contributor

i can confirm this fixes it

@sgtcoolguy sgtcoolguy merged commit 82bc66d into tidev:master Aug 10, 2016
@sgtcoolguy sgtcoolguy deleted the TIMOB-23745 branch August 10, 2016 13:08
@sgtcoolguy
Copy link
Contributor Author

Thanks for testing, @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