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-14213-Change clearTimeout to take an object so that we can handle ... #5756

Merged
merged 2 commits into from Jun 18, 2014

Conversation

salachi
Copy link
Contributor

@salachi salachi commented Jun 3, 2014

Changed the clearTimeout function to take an object instead of integer so that we can handle null values.

https://jira.appcelerator.org/browse/TIMOB-14213

@hieupham007
Copy link
Contributor

Sunil, the core problem of this issue is that we don't handle the value 'undefined' with type int properly. We return 0 for value 'null'. This is a problem in our proxy binding code. Please look at ProxyBinding.fm line 511-519. This is what's causing the error. Proxybinding.fm is used to generate v8 cpp files. Go to kroll-v8/generated/ti.modules.titanium.TitaniumModule.cpp after you build the project, and you will see that we are throwing this error when value is undefined.

@hieupham007
Copy link
Contributor

This PR provides a workaround, but this problem persists for every single method we expose with type int, i.e it will crash when passed in 'undefined' values.

@salachi
Copy link
Contributor Author

salachi commented Jun 5, 2014

Thanks Hieu for the pointer, I have modified the Proxybinding.fm to treat undefined just like null for number.

@hieupham007
Copy link
Contributor

Code reviewed and functionally tested. Request accepted

hieupham007 added a commit that referenced this pull request Jun 18, 2014
TIMOB-14213-Change clearTimeout to take an object so that we can handle ...
@hieupham007 hieupham007 merged commit c342f14 into tidev:master Jun 18, 2014
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