[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp |
Date: |
Sat, 28 Apr 2007 17:05:53 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/04/28 17:05:53
Modified files:
. : ChangeLog
server/vm : ASHandlers.cpp
Log message:
* server/vm/ASHandlers.cpp (ActionWith): skip with() blocks
given a parameter not casting to an object.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3031&r2=1.3032
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.102&r2=1.103
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3031
retrieving revision 1.3032
diff -u -b -r1.3031 -r1.3032
--- ChangeLog 28 Apr 2007 16:56:54 -0000 1.3031
+++ ChangeLog 28 Apr 2007 17:05:53 -0000 1.3032
@@ -1,5 +1,7 @@
2007-04-28 Sandro Santilli <address@hidden>
+ * server/vm/ASHandlers.cpp (ActionWith): skip with() blocks
+ given a parameter not casting to an object.
* testsuite/actionscript.all/with.as:
Add tests explaining why the tests in previous
commit are failing in SWF5 version.
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- server/vm/ASHandlers.cpp 27 Apr 2007 16:09:01 -0000 1.102
+++ server/vm/ASHandlers.cpp 28 Apr 2007 17:05:53 -0000 1.103
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: ASHandlers.cpp,v 1.102 2007/04/27 16:09:01 strk Exp $ */
+/* $Id: ASHandlers.cpp,v 1.103 2007/04/28 17:05:53 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3382,7 +3382,8 @@
assert( code[pc] == SWF::ACTION_WITH );
thread.ensureStack(1); // the object
- boost::intrusive_ptr<as_object> with_obj = env.pop().to_object();
+ as_value with_obj_val = env.pop().to_object();
+ boost::intrusive_ptr<as_object> with_obj = with_obj_val.to_object();
++pc; // skip tag code
@@ -3409,6 +3410,17 @@
// now we should be on the first action of the 'with' body
assert(thread.next_pc == pc);
+ if ( ! with_obj )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror(_("with(%s) : first argument doesn't cast to an
object!"),
+ with_obj_val.to_debug_string().c_str());
+ );
+ // skip the full block
+ thread.next_pc += block_length;
+ return;
+ }
+
// where does the 'with' block ends ?
unsigned block_end = thread.next_pc + block_length;