[Laszlo-checkins] r14306 - openlaszlo/trunk/WEB-INF/lps/lfc/services

ptw@openlaszlo.org ptw at openlaszlo.org
Fri Jul 10 08:55:38 PDT 2009


Author: ptw
Date: 2009-07-10 08:55:36 -0700 (Fri, 10 Jul 2009)
New Revision: 14306

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs
Log:
Change 20090710-ptw-m by ptw at dueling-banjos.home on 2009-07-10 11:43:11 EDT
    in /Users/ptw/OpenLaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Review comments on r14304

Bugs Fixed: LPP-5222 Memory tracing does not work in DHTML

Technical Reviewer: a.bargull at intensis.de (Message-ID: <4A57651B.2050106 at udo.edu>)

Details:
    Move emptying of dkeys array to before possible early exit.

Tests:
    Inspection



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs	2009-07-10 15:47:25 UTC (rev 14305)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs	2009-07-10 15:55:36 UTC (rev 14306)
@@ -212,10 +212,15 @@
         var dkhash:Object = this.downKeysHash;
         var isDown:Boolean = dkhash[ kC ];
         delete dkhash[ kC ];
+        var dkeys:Array = this.downKeysArray;
+        // Avoid allocating a new array for each keystroke
+        dkeys.length = 0;
 
         if ($dhtml) {
             // not necessary for DHTML
         } else {
+            // TODO: [2009-07-10 ptw] This should be in the kernel,
+            // controlled by a quirk, not here in the generic code
             // LPP-7012 we don't get a key up from the 'v' in a command-v sequence on the mac.
             // Workaround is to send all keys up when we see a 'command' (control) key-up event.
             // (Only required for Flash)
@@ -233,9 +238,7 @@
                 return;
             }
         }
-        var dkeys:Array = this.downKeysArray;
-        // Avoid allocating a new array for each keystroke
-        dkeys.length = 0;
+
         // update downKeysArray before sending onkeyup-event
         for (var k:String in dkhash) {
             dkeys.push( k );



More information about the Laszlo-checkins mailing list