Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2583] Android: Webview evalJS causes a never-released semaphore lock (and thread lockup) if JS code contains error

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:31.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M01
ComponentsAndroid
Labelsandroid, defect, release-1.6.0, webview
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:23:27.000+0000
Updated2011-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!

Comments

  1. Bill Dawson 2011-04-15

    (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...

  2. Bill Dawson 2011-04-15

    (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...

  3. Thomas Huelbert 2011-04-15

    [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

JSON Source