[TIMOB-7335] Android: V8: handle JS failure when invoking V8Function
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-01-23T14:43:18.000+0000 |
| Affected Version/s | Release 1.8.0.1 |
| Fix Version/s | Sprint 2012-02, Release 2.0.0, Release 1.8.1 |
| Components | Android |
| Labels | module_runtime, qe-testadded |
| Reporter | Opie Cyrus |
| Assignee | Opie Cyrus |
| Created | 2012-01-23T13:49:06.000+0000 |
| Updated | 2012-01-31T14:09:30.000+0000 |
Description
When invoking a V8Function that results in a JS error, the app would crash hard instead of handling and reporting the error
Test app:
var window1 = Ti.UI.createWindow({
fullscreen: true,
backgroundColor: "red"
});
var myObject = {};
myObject.a = 1;
var button1 = Ti.UI.createButton({
title: "click me!",
top: 50,
left: 50
});
button1.addEventListener("click", function(e) {
button1.animate({top: 100, duration: 200}, function(e) {
Ti.API.info(">>>>>>>>> myObject.a = " + myObject.a);
myObject = null;
Ti.API.info(">>>>>>>>> myObject.b = " + myObject.b);
});
});
window1.add(button1);
window1.open();
Closing bug. Verified fix on: SDK build: 1.8.1.v20120123161633 Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201210622 Devices: Droid 2.2.3
Updating labels