[TIMOB-56] Android: Race condition in HTTPClient when invoking readystate callback
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:51:50.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 0.6.0 |
Components | Android |
Labels | android, fa_0_5_0 |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T02:23:09.000+0000 |
Updated | 2011-04-17T01:51:50.000+0000 |
Description
A race condition exists where the readyState function invocations were being queued up by the WebViewCoreThread and only executing after readyState had been set to 4. So in normal usage patterns the code executed when the document was loaded was getting run 3 or 4 times depending on whether the callback was set before or after open.
(from [12a8718043d27d211b9d2ce399c5659388bb0a6b]) [#56 state:resolved] Extened logging to show thread name, added support for synchronus callbacks in TitaniumWebView. Added sync callbacks to HTTPClient to call handler synchronously. http://github.com/appcelerator/titanium_mobile/commit/12a8718043d27d211b9d2ce399c5659388bb0a6b"> http://github.com/appcelerator/titanium_mobile/commit/12a8718043d27...