[Laszlo-checkins] r12752 - in openlaszlo/trunk: WEB-INF/lps/config lps/components/rpc
dda@openlaszlo.org
dda at openlaszlo.org
Thu Feb 5 04:40:51 PST 2009
Author: dda
Date: 2009-02-05 04:40:31 -0800 (Thu, 05 Feb 2009)
New Revision: 12752
Modified:
openlaszlo/trunk/WEB-INF/lps/config/lps.properties
openlaszlo/trunk/lps/components/rpc/xmlrpc.lzx
Log:
Change 20090204-dda-1 by dda at lester-2.local on 2009-02-04 15:52:38 EST
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-g
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Local fix to xml-rpc to work with catcherrors=true
New Features:
Bugs Fixed: LPP-7721 [xml-rpc is not working when "compiler.swf9.catcherrors=true"]
Technical Reviewer: ptw (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
** change set made to trunk, for consideration for 4.2.0.1 (probably just xmlrpc.lzx)
lps/components/rpc/xmlrpc.lzx
Installed a workaround for the problem:
A closure written in xmlrpc.lzx uses arguments.callee.args, but when it is processed with the try/catch block
(with its own closure inserted) the meaning of arguments.callee.args changes.
This 'tryall' processing was only intended for top level functions, but we needed to allow it to be
installed for function expressions as well to allow for state methods (which appear to us as closures within an
initialization list). The workaround is simply to turn off catchFunctionExceptions via a pragma to
address this narrow case.
As this technique may be used elsewhere, we might consider a more holistic solution. Such as one of:
A) have the tag compiler mark 'top level' closure that it generates so we can turn off 'tryall'
for other function closures.
B) detect the use of 'arguments' (would there be anything else to look for?) and cause the original
arguments to be saved and used as appropriate. Perhaps an initial 'save' of arguments.callee.xxxx
if pushed out of the try block.
C) have a runtime check to only call use the 'tryall' try block only if a tryall hasn't been established
yet. Then we'd really only do this on a top level function. But who says top level functions can't
access arguments.callee.xxxx (also a problem with solution A)? Also, this is pretty ugly.
WEB-INF/lps/config/lps.properties
Changed the default for lps.properties to set catcherrors to false.
This was apparently mistakenly enabled recently. We don't have it on as
the default since it is still undocumented/experimental, and smokecheck
does not pass with it on.
Tests:
With catcherrors=true:
Test case from LPP-7721
Tucker's test case in LPP-7514 to verify that state methods work
With catcherrors=false:
{smokecheck,lzpix} x {swf8,swf9,dhtml}
Modified: openlaszlo/trunk/WEB-INF/lps/config/lps.properties
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/config/lps.properties 2009-02-05 09:00:05 UTC (rev 12751)
+++ openlaszlo/trunk/WEB-INF/lps/config/lps.properties 2009-02-05 12:40:31 UTC (rev 12752)
@@ -165,7 +165,7 @@
compiler.swf9.warnings=false
compiler.swf9.execflex=false
# Tell swf9 compiler to catch errors in debug mode
-compiler.swf9.catcherrors=true
+#compiler.swf9.catcherrors=true
#===============================================================================
Modified: openlaszlo/trunk/lps/components/rpc/xmlrpc.lzx
===================================================================
--- openlaszlo/trunk/lps/components/rpc/xmlrpc.lzx 2009-02-05 09:00:05 UTC (rev 12751)
+++ openlaszlo/trunk/lps/components/rpc/xmlrpc.lzx 2009-02-05 12:40:31 UTC (rev 12752)
@@ -31,6 +31,7 @@
// create proxy for a particular funcname only once.
if ( this.proxy[method] == null ) {
+#pragma "catchFunctionExceptions=false"
this.proxy[method] = function (paramArr, delegate) {
var args = arguments.callee.args;
LzXMLRPCService.invoke(delegate, paramArr,
More information about the Laszlo-checkins
mailing list