Ah yes, you're right. I only thought about my first test case when adding an `undefined` property to the prototype.

On 12/2/2010 12:34 AM, P T Withington wrote:
I can't put it in the catch block, because describeType doesn't get an error 
looking up invalid properties on dynamic classes.  So, the only really safe 
thing to do is to check every time.  As you say, this is not 
performance-critical, so I think that's the way I will leave it, until we learn 
that Adobe has fixed their sloppy code.

On 2010-12-01, at 18:23, André Bargull wrote:

I wonder whether it'd be better to place the sanity check in the catch-block 
(and then re-call describeType() etc.), so the check won't run every time 
carefulDescribeType() is called, but otoh this isn't runtime critical code. So 
approved!


On 12/2/2010 12:10 AM, P T Withington wrote:
Change ptw-20101201-UX5 by [email protected] on 2010-12-01 18:03:58 EST
     in /Users/ptw/OpenLaszlo/trunk-3
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Be even more careful calling describeType

Bugs Fixed:  LPP-9553 Inspecting a Backtrace in SWF10 gets error when printing 
to debug console

Technical Reviewer: [email protected] (pending), [email protected] 
(pending)
QA Reviewer: [email protected] (pending)

Details:
     Ensure there are no enumerable properties in
     {Object,Array}.prototype before calling flash.utils.describeType.

Tests:
     Test cases from bug report.

Files:
M       WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20101201-UX5.tar



Reply via email to