[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v...
From: |
Sandro Santilli |
Subject: |
Re: [Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v... |
Date: |
Tue, 27 Nov 2007 08:39:42 +0100 |
On Tue, Nov 27, 2007 at 08:53:05AM +0800, zou lunkai wrote:
> + /// @param allowUnloaded
> + /// If true an unloaded sprite is still returned as such,
> + /// rather then attempted to be resolved as a soft-reference.
> + /// Main use for this is during paths resolution, to avoid
> + /// infinite loops. See bug #21647.
> + ///
> + sprite_instance* to_sprite(bool allowUnloaded=false) const;
>
> In which scenario we are not allowed to access an unloaded sprites?
> Shouldn't to_sprite() always allow unloaded characters?
I tried to produce a testcase with no success yesterday.
Yes, the wording is confused, we're always allowed to access
an unloaded sprite, the difference here is wheter to attempt
to rebind a soft-reference to an unloaded sprite or not.
The signature could be renamed to take a bool skipRebinding=false
The problem was a _level0.ch.ch path that while resolving the
first 'ch' element reached the as_value::to_object() point
(ch was found as a proper property but not as a child).
to_object() in turn called to_sprite as it was a soft-reference
which in turn tried to evaluate the target which got to the start
(maybe a soft-reference to self, with self unloaded would do, probably
inside an onUnload handler; will try again today).
--strk;