[Laszlo-dev] For Review: Change 20090206-dda-z Summary: With catcherrors=true, disable try/catch/closure when 'arguments' is used.
Donald Anderson
dda at ddanderson.com
Fri Feb 6 19:48:22 PST 2009
Change 20090206-dda-z by dda at lester-2.local on 2009-02-06 22:16:07 EST
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-g/test
for http://svn.openlaszlo.org/openlaszlo/trunk/test
Summary: With catcherrors=true, disable try/catch/closure when
'arguments' is used.
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:
** for consideration in 4.2.0.1
'arguments' refers to the arguments passed to the enclosing
function, and allows some
clever examination of arguments dynamically. With
catcherrors=true, an additional
function closure is wrapped around each function within a try/
catch, and the extra
function thwarts the use of 'arguments' within the body of the
original function.
To avoid such problems, we disable catcherrors for any functions
that refer to
the magic 'arguments'. This allows us to remove the workaround
pragmas added
to lps/components (which also disabled catcherrors, but for
specific functions)
As a bonus, smokecheck now passes with catcherrors enabled.
It's true that now a small percentage of functions will not have
the try/catch wrapping
that used to have it. However, such functions should be relative
rare, will probably
be in component code rather than user code, and if in user code,
would probably not
be a top level function. Any such functions that are not top
level functions would
will be under the control of a higher level try/catch block.
Finally, any such functions
that we now don't wrap may well have been broken under the
previous implementation.
Tests:
With catcherrors=true:
{smokecheck,lzpix,weather} x {swf8,swf9,dhtml}
Verified that testcase submitted with LPP-7721 works.
Verified that Tucker's test case from LPP-7514 works. (illustrating
that an error in a function
is ignored, allowing the function to return 'normally' and
execution to continue).
Files:
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M lps/components/rpc/xmlrpc.lzx
M lps/components/rpc/javarpc.lzx
M lps/components/rpc/soap.lzx
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090206-dda-z.tar
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-306-2057
email: dda at ddanderson.com
www: http://www.ddanderson.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090206/008d6c9b/attachment-0001.html
More information about the Laszlo-dev
mailing list