[Laszlo-checkins] r12241 - openlaszlo/trunk/WEB-INF/lps/lfc/data

bargull@openlaszlo.org bargull at openlaszlo.org
Fri Dec 26 14:17:57 PST 2008


Author: bargull
Date: 2008-12-26 14:17:54 -0800 (Fri, 26 Dec 2008)
New Revision: 12241

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
Log:
Change 20081226-bargull-bpg by bargull at dell--p4--2-53 on 2008-12-26 21:15:00
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: add type check to prevent TypeError in dhtml/swf9

New Features:

Bugs Fixed: LPP-4568

Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
A simple type check was necessary to make the test pass in swf9 and dhtml.
    

Tests:
see bugreport



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2008-12-26 20:17:41 UTC (rev 12240)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2008-12-26 22:17:54 UTC (rev 12241)
@@ -491,14 +491,22 @@
 
 /** @access private */
 function __LZgetLast () :int { 
-    if ( this.context == null || this.context === this ) return 1;
-    return this.context.__LZgetLast() || 1;
+    var ctx:* = this.context;
+    if (ctx == null || ctx === this || !(ctx is LzDatapointer)) {
+        return 1;
+    } else {
+        return ctx.__LZgetLast() || 1;
+    }
 }
 
 /** @access private */
 function __LZgetPosition () :int { 
-    if ( this.context == null || this.context === this ) return 1;
-    return this.context.__LZgetPosition() || 1;
+    var ctx:* = this.context;
+    if (ctx == null || ctx === this || !(ctx is LzDatapointer)) {
+        return 1;
+    } else {
+        return ctx.__LZgetPosition() || 1;
+    }
 }
 
 /** @access private */



More information about the Laszlo-checkins mailing list