<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Committed. &nbsp;Future work is in&nbsp;LPP-7732 assigned to me for now.<div><br><div><div>On Feb 7, 2009, at 2:33 PM, P T Withington wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I'm approving this because it appears safe and we would like it in 4.2.0.1.<br><br>I think we should file an improvement to re-address this in 4.2.1, using something more like the Debug.evalCarefully technology, which is used in DHTML. &nbsp;The evalCarefully approach would be to wrap the potentially erring function at the call site, where the analysis of free references will be much simpler, hence the creation of a closure that does not perturb those references will be simpler too.<br><br>We can analyze whether putting the try/catch inline at call sites rather than in function &nbsp;bodies causes too much code bloat and measure that against the speed penalty of using an evalCarefully subroutine instead.<br><br>Please check in this fix and create a new bug with the above suggestions.<br><br>On 2009-02-06, at 22:48EST, Donald Anderson wrote:<br><br><blockquote type="cite">Change 20090206-dda-z by <a href="mailto:dda@lester-2.local">dda@lester-2.local</a> on 2009-02-06 22:16:07 EST<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;in /Users/dda/laszlo/src/svn/openlaszlo/trunk-g/test<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;for <a href="http://svn.openlaszlo.org/openlaszlo/trunk/test">http://svn.openlaszlo.org/openlaszlo/trunk/test</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Summary: With catcherrors=true, disable try/catch/closure when 'arguments' is used.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">New Features:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Bugs Fixed: LPP-7721 [xml-rpc is not working when "compiler.swf9.catcherrors=true"]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Technical Reviewer: ptw (pending)<br></blockquote><blockquote type="cite">QA Reviewer: (pending)<br></blockquote><blockquote type="cite">Doc Reviewer: (pending)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Documentation:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Release Notes:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Details:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;** for consideration in 4.2.0.1<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;'arguments' refers to the arguments passed to the enclosing function, and allows some<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;clever examination of arguments dynamically. &nbsp;With catcherrors=true, an additional<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;function closure is wrapped around each function within a try/catch, and the extra<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;function thwarts the use of 'arguments' within the body of the original function.<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;To avoid such problems, we disable catcherrors for any functions that refer to<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;the magic 'arguments'. &nbsp;This allows us to remove the workaround pragmas added<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;to lps/components (which also disabled catcherrors, but for specific functions)<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;As a bonus, smokecheck now passes with catcherrors enabled.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;It's true that now a small percentage of functions will not have the try/catch wrapping<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;that used to have it. &nbsp;However, such functions should be relative rare, will probably<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;be in component code rather than user code, and if in user code, would probably not<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;be a top level function. &nbsp;Any such functions that are not top level functions would<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;will be under the control of a higher level try/catch block. &nbsp;Finally, any such functions<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;that we now don't wrap may well have been broken under the previous implementation.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Tests:<br></blockquote><blockquote type="cite"> With catcherrors=true:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;{smokecheck,lzpix,weather} x {swf8,swf9,dhtml}<br></blockquote><blockquote type="cite"> Verified that testcase submitted with LPP-7721 works.<br></blockquote><blockquote type="cite"> Verified that Tucker's test case from LPP-7514 works. (illustrating that an error in a function<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;is ignored, allowing the function to return 'normally' and execution to continue).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Files:<br></blockquote><blockquote type="cite">M &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java<br></blockquote><blockquote type="cite">M &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lps/components/rpc/xmlrpc.lzx<br></blockquote><blockquote type="cite">M &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lps/components/rpc/javarpc.lzx<br></blockquote><blockquote type="cite">M &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lps/components/rpc/soap.lzx<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Changeset: <a href="http://svn.openlaszlo.org/openlaszlo/patches/20090206-dda-z.tar">http://svn.openlaszlo.org/openlaszlo/patches/20090206-dda-z.tar</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Don Anderson<br></blockquote><blockquote type="cite">Java/C/C++, Berkeley DB, systems consultant<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">voice: 617-306-2057<br></blockquote><blockquote type="cite">email: <a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a><br></blockquote><blockquote type="cite">www: <a href="http://www.ddanderson.com">http://www.ddanderson.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">--</div><div><br>Don Anderson<br>Java/C/C++, Berkeley DB, systems consultant<br><br>voice: 617-306-2057<br>email:&nbsp;<a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a><br>www:&nbsp;<a href="http://www.ddanderson.com/">http://www.ddanderson.com</a><br></div></div></span></span><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>