Change 20100225-bargull-RwS by barg...@dell--p4--2-53 on 2010-02-25 17:55:52
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: improve timeout code in LzHTTPLoader

New Features: LPP-8791 (Better timeout handling for LzHTTPLoader)

Technical Reviewer: henry

Details:
LzHTTPLoader:
The "activeRequests" Object is relic of the 4.0 LzHTTPLoader 
implementation. Originally, "activeRequests" used to be an 
array to hold all outstanding requests for periodic timeout checks. 
Later it was changed to an Object to support per request checks, but 
there is still code to "add it (a request) back to the list", 
see __LZcheckXMLHTTPTimeouts(). But as 
{LzTimeKernel,window}.setTimeout() ensures the timeout callback function 
won't be invoked before the timeout has ellapsed, a premature call 
to __LZcheckXMLHTTPTimeouts() is not possible. That means that code can 
be removed and we only need to handle the timeout, see 
__LZhandleXMLHTTPTimeout(). To pass the current LzHTTPLoader to 
__LZhandleXMLHTTPTimeout(), the optional arguments for 
window.setTimeout() are used in DHTML. We don't need this extra 
parameter in SWF9/10, because methods are bound.

DHTML:
- Also removed the #pragma in open(), the #pragma was added back in the 
days to prevent the compiler from changing the "new" statement

SWF9/10:
- LzKernelTimer: changed postincrement to preincrement for timer-ID to 
make it possible to use 0 as marker in LzHTTPLoader (can't use -1 
because type is uint)


Tests:
alldata swf10, dhtml (Firefox, Safari, Opera)

Files:
M WEB-INF/lps/lfc/kernel/dhtml/LzHTTPLoader.js
M WEB-INF/lps/lfc/kernel/swf9/LzTimeKernel.as
M WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/20100225-bargull-RwS.tar

_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to