appcelerator/titanium_mobile — pull request #3932 by vishalduggal (2013-03-04 23:32:37+00:00)
Title: [TIMOB-11771] Android: WebView crashes with basic HTML on emulator

Test is in [JIRA](https://jira.appcelerator.org/browse/TIMOB-11771)

The basic crash is due to incrementing GREF count which is tied into our polling code.

What this PR does is wrap the eval code inside a function that returns a primitive (int) which does not increment the GREF count. Does not change any existing functionality

So basically for simple webviews the developers should be ok. The crash will however occur once the getJSCode returns enough valid string values (basically GREF goes up by 1 on every valid return). So essentially this PR puts off the crash for some time but does not really fix it.

Also added the annotation @JavascriptInterface and had to update the build files for that. See documentation [here](http://developer.android.com/reference/android/webkit/JavascriptInterface.html)

This is a problem on emulators only. It is up to the reviewer whether the ticket should be marked as resolved or HOLD.