Author: hqm
Date: 2007-10-23 13:05:36 -0700 (Tue, 23 Oct 2007)
New Revision: 6975
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
Log:
Change 20071023-hqm-8 by [EMAIL PROTECTED] on 2007-10-23 12:09:47 EDT
in /cygdrive/c/users/hqm/openlaszlo/trunk/WEB-INF/lps/lfc
for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc
Summary: fix to report errors in media loading
New Features:
Bugs Fixed: LPP-4099
Technical Reviewer: max
QA Reviewer: pbr
Doc Reviewer:
Documentation:
Release Notes:
Details:
In the case of a server media error, the media loader calls returnData
twice, once when the image swf is loaded (normal path), and the error
swf itself calls returnData.
That second call was being ignored by returnData because it ignored
any loader which was marked as loaded.
This fix adds a check for non-null data, and if so, returns it.
Tests:
test/lfc/data/testhttpdata.lzx
test/lfc/data/alldata.lzx
This should report an error immediately in proxied mode
<canvas width="100%" height="80%" debug="true">
<debug fontsize="12"/>
<view resource="http://www.javawen.info/try/news_bg.png"
onload="Debug.write('onload', this)"
ontimeout="Debug.write('ontimeout', this)"
onerror="Debug.write('onerror', this)"
/>
</canvas>
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as 2007-10-23
19:24:45 UTC (rev 6974)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as 2007-10-23
20:05:36 UTC (rev 6975)
@@ -104,6 +104,11 @@
// cancel the timeout handler
LzLoadQueue.unloadRequest(this);
} else {
+ // If we timed out, and this response came in late, ignore it.
+ if (this.timedout) {
+ return;
+ }
+
//Debug.write("LzLoadQueue.XMLOnDataHandler success", this, this.loader);
// Create a queue containing one root node, myself, and convert it and
all children to
// LzDataNodes.
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs 2007-10-23
19:24:45 UTC (rev 6974)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs 2007-10-23
20:05:36 UTC (rev 6975)
@@ -146,7 +146,7 @@
// object. This can happen if a serverless data load timed out in
// the LFC, but eventually returned something via the
// LoadVars.sendAndLoad() callback.
- if (loadobj.loaded && loadobj.valid) {
+ if (loadobj.loaded && loadobj.valid && loadobj.timedout && data == null) {
if ($debug) {
Debug.warn("%w.returnData: %w already loaded",
this, loadobj);
@@ -357,6 +357,9 @@
* @access private
*/
function requestDirectXML ( o ){
+ if ($debug) {
+ LzLoader.debugLoadObj(o);
+ }
this.initializeRequestObj(o);
LzLoadQueue.enqueueRequest( o );
// We should probably be passing something other than the obj itself to
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins