gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash/testsuite/actionscript.all Object.as


From: Sandro Santilli
Subject: Re: [Gnash-commit] gnash/testsuite/actionscript.all Object.as
Date: Tue, 8 Apr 2008 09:13:53 +0200

On Tue, Apr 08, 2008 at 11:49:21AM +0800, zou lunkai wrote:
> hmm,  many of the 'getter setter' related tests in Object.as are a bit
> insane, unless they are all aimed at testing recursion. (But we don't
> need that much, that would make our 'make check' even slower:) )

I was tracking failures in swfdec testsuite.
I belive one of the things slowing down 'make check' is gnash startup
initialization time.
See http://wiki.gnashdev.org/Initialization#Performance

> > +simple_test_getter = function() { return this.test; };
> > +o = {};
> > +o.addProperty("test", simple_test_getter, noset_setter);
> 
> I bet this is not the general way to use a getter.  It's easy to cause
> recursions  in swf7 and above. More general code would be:
> (1)
>      simple_test_getter = function()  { return  test; };

'test' wouldn't necessarely look in 'this' first, right ?

> (2)
>     simple_test_getter = function()  { return  this.test_cache; };

Well, there seem to be a cache anyway, not causing recursion in SWF6,
we want to be compatible...

> BTW, we know there is a global 'o' in _global,  so not using 'o' as an
> object name in our test should be safer.

Ouch, didn't think about this, can you rename those 'o' ?

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]