[TIMOB-2583] Android: Webview evalJS causes a never-released semaphore lock (and thread lockup) if JS code contains error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:59:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M01 |
Components | Android |
Labels | android, defect, release-1.6.0, webview |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:23:27.000+0000 |
Updated | 2011-04-17T01:59:31.000+0000 |
Description
To reproduce, here is some code for a window:
var win = Ti.UI.currentWindow;
var wv = Ti.UI.createWebView({url: 'http://www.google.com'});
wv.addEventListener('load', function(e) {
wv.evalJS('Mickey'); // ReferenceError in browser JS
});
win.add(wv);
In the fail-case, that should lock up your application pretty good!
(from [c84d12e41cedeba00f5fd825ca21fd0fcc175d06]) [#2583 state:fixed-in-qa]Catch JS exceptions in getJSValue and return empty string like iOS https://github.com/appcelerator/titanium_mobile/commit/c84d12e41cedeba00f5fd825ca21fd0fcc175d06"> https://github.com/appcelerator/titanium_mobile/commit/c84d12e41ced...
(from [597a4878af606e255811964cc5cbc9b93df5dfb2]) [#2583] drillbit unit test for evalJS lockup https://github.com/appcelerator/titanium_mobile/commit/597a4878af606e255811964cc5cbc9b93df5dfb2"> https://github.com/appcelerator/titanium_mobile/commit/597a4878af60...
[INFO] Titanium SDK version: 1.6.0 (01/04/11 08:01 e49700d), code did not lock up app 2.2.1, (droid 1) 1.6 G1