gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog libbase/string_table.cpp libbas...


From: strk
Subject: Re: [Gnash-commit] gnash ChangeLog libbase/string_table.cpp libbas...
Date: Tue, 23 Oct 2007 23:01:15 +0200

On Tue, Oct 23, 2007 at 07:39:41PM +0200, strk wrote:
> On Thu, Oct 18, 2007 at 11:47:57AM +0000, Chad Musick wrote:
> 
> > http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.68&r2=1.69
> 
> 
> > -   // found a getter/setter property in the inheritance chain
> > -   // so set that and return
> > -   Property* prop = findGetterSetter(key);
> > -   if ( prop )
> > -   {
> > -           try 
> > +// Handles read_only and static properties properly.
> > +void
> > +as_object::set_member_default(string_table::key key, const as_value& val,
> > +   string_table::key nsname)
> > +{
> > +   //log_msg(_("set_member_default(%s)"), key.c_str());
> > +   Property* prop = findProperty(key, nsname);
> 
> Chad, it seems this change broke something, see my new test in 
> actionscript.all/Object.as
> 

> This is the problem:
> 
> class A : B : C
> 
>       C.m is a getter-setter
>       B.m is a normal property
>       A.m doesn't exist
> 
> When setting A.m, the getter-setter should be invoked.
> findProperty would find B.m and return that while findGetterSetter would 
> find C.m.
> 
> No idea about the new isStatic thing.

I'm thinking about adding a findUpdatableProperty, which would check for 
GetterSetters
and possible "statics" (if it makes sense for you) and own properties.
The method would also need to be used in the current 
as_environment::set_variable_raw
as objects in the scope stack (with stack at least) should never be added 
members to
unless updatable properties (getter-setter in their inheritance chain or 
pre-existing
own properties of them) are found.

--strk;




reply via email to

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