[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/vm/ActionExec.cpp server...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/vm/ActionExec.cpp server... |
Date: |
Tue, 04 Sep 2007 10:19:02 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/04 10:19:02
Modified files:
. : ChangeLog
server/vm : ActionExec.cpp ActionExec.h ExecutableCode.h
testsuite/misc-swfc.all: movieclip_destruction_test1.sc
movieclip_destruction_test3.sc
Log message:
* server/vm/ActionExec.{cpp,h}: add an _abortOnUnload flag
for premature abortion of action buffers being executed,
always false for functions and true by default for
global code (overridable by a third optional constructor
argument). Check target for being unloaded (if _abortOnUnload)
at opcode-level.
* server/vm/ExecutableCode.h (EventCode): set _abortOnUnload
to false when constructing ActionExec for event code.
* testsuite/misc-swfc.all/: movieclip_destruction_test1.sc,
movieclip_destruction_test3.sc: successes with premature
abortion of action buffers.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4212&r2=1.4213
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.h?cvsroot=gnash&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ExecutableCode.h?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/movieclip_destruction_test1.sc?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/movieclip_destruction_test3.sc?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4212
retrieving revision 1.4213
diff -u -b -r1.4212 -r1.4213
--- ChangeLog 4 Sep 2007 08:26:22 -0000 1.4212
+++ ChangeLog 4 Sep 2007 10:19:00 -0000 1.4213
@@ -1,3 +1,17 @@
+2007-09-04 Sandro Santilli <address@hidden>
+
+ * server/vm/ActionExec.{cpp,h}: add an _abortOnUnload flag
+ for premature abortion of action buffers being executed,
+ always false for functions and true by default for
+ global code (overridable by a third optional constructor
+ argument). Check target for being unloaded (if _abortOnUnload)
+ at opcode-level.
+ * server/vm/ExecutableCode.h (EventCode): set _abortOnUnload
+ to false when constructing ActionExec for event code.
+ * testsuite/misc-swfc.all/: movieclip_destruction_test1.sc,
+ movieclip_destruction_test3.sc: successes with premature
+ abortion of action buffers.
+
2007-09-04 Benjamin Wolsey <address@hidden>
* configure.ac: make kde development package advice
Index: server/vm/ActionExec.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- server/vm/ActionExec.cpp 10 Aug 2007 15:17:44 -0000 1.41
+++ server/vm/ActionExec.cpp 4 Sep 2007 10:19:01 -0000 1.42
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: ActionExec.cpp,v 1.41 2007/08/10 15:17:44 strk Exp $ */
+/* $Id: ActionExec.cpp,v 1.42 2007/09/04 10:19:01 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -85,7 +85,8 @@
stop_pc(pc+func.getLength()),
next_pc(pc),
env(newEnv),
- retval(nRetVal)
+ retval(nRetVal),
+ _abortOnUnload(false)
{
//GNASH_REPORT_FUNCTION;
@@ -106,7 +107,7 @@
}
}
-ActionExec::ActionExec(const action_buffer& abuf, as_environment& newEnv)
+ActionExec::ActionExec(const action_buffer& abuf, as_environment& newEnv, bool
abortOnUnloaded)
:
with_stack(),
_scopeStack(), // TODO: initialize the scope stack somehow
@@ -118,7 +119,8 @@
stop_pc(code.size()),
next_pc(0),
env(newEnv),
- retval(0)
+ retval(0),
+ _abortOnUnload(abortOnUnloaded)
{
//GNASH_REPORT_FUNCTION;
@@ -166,6 +168,11 @@
try {
while (pc<stop_pc)
{
+ if ( _abortOnUnload && _original_target->isUnloaded() )
+ {
+ log_debug("Target of action_buffer unloaded during
execution, discarding %d remaining opcodes", stop_pc-pc);
+ break;
+ }
// Cleanup any expired "with" blocks.
while ( ! with_stack.empty() && pc >= with_stack.back().end_pc() ) {
Index: server/vm/ActionExec.h
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ActionExec.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- server/vm/ActionExec.h 10 Aug 2007 15:17:44 -0000 1.20
+++ server/vm/ActionExec.h 4 Sep 2007 10:19:01 -0000 1.21
@@ -118,6 +118,8 @@
///
void fixStackUnderrun(size_t required);
+ bool _abortOnUnload;
+
public:
/// \brief
@@ -176,7 +178,11 @@
/// @param newEnv
/// the execution environment (variables scope, stack etc.)
///
- ActionExec(const action_buffer& abuf, as_environment& newEnv);
+ /// @param abortOnUnloaded
+ /// If true (the default) execution aborts as soon as the target
sprite is unloaded.
+ /// NOTE: original target is fetched from the environment.
+ ///
+ ActionExec(const action_buffer& abuf, as_environment& newEnv, bool
abortOnUnloaded=true);
/// Create an execution thread for a function call.
//
Index: server/vm/ExecutableCode.h
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ExecutableCode.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- server/vm/ExecutableCode.h 20 Aug 2007 15:15:29 -0000 1.8
+++ server/vm/ExecutableCode.h 4 Sep 2007 10:19:01 -0000 1.9
@@ -15,7 +15,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: ExecutableCode.h,v 1.8 2007/08/20 15:15:29 strk Exp $ */
+/* $Id: ExecutableCode.h,v 1.9 2007/09/04 10:19:01 strk Exp $ */
#ifndef GNASH_EXECUTABLECODE_H
#define GNASH_EXECUTABLECODE_H
@@ -148,7 +148,7 @@
for (BufferList::iterator it=_buffers.begin(),
itEnd=_buffers.end();
it != itEnd; ++it)
{
- ActionExec exec(*(*it), _target->get_environment());
+ ActionExec exec(*(*it), _target->get_environment(),
false);
exec();
}
}
Index: testsuite/misc-swfc.all/movieclip_destruction_test1.sc
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-swfc.all/movieclip_destruction_test1.sc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- testsuite/misc-swfc.all/movieclip_destruction_test1.sc 4 Sep 2007
09:33:10 -0000 1.8
+++ testsuite/misc-swfc.all/movieclip_destruction_test1.sc 4 Sep 2007
10:19:01 -0000 1.9
@@ -126,7 +126,7 @@
.frame 6 // target frame
.action:
- xcheck_equals(_root.x, 0);
+ check_equals(_root.x, 0);
.end
Index: testsuite/misc-swfc.all/movieclip_destruction_test3.sc
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-swfc.all/movieclip_destruction_test3.sc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/misc-swfc.all/movieclip_destruction_test3.sc 4 Sep 2007
09:27:45 -0000 1.2
+++ testsuite/misc-swfc.all/movieclip_destruction_test3.sc 4 Sep 2007
10:19:02 -0000 1.3
@@ -119,9 +119,9 @@
.frame 20
.action:
- xcheck_equals(_root.x, 300);
+ check_equals(_root.x, 300);
check_equals(typeof(nestedMovieClip), 'undefined');
- xcheck_equals(_root.as_order, "0+1+2+");
+ check_equals(_root.as_order, "0+1+2+");
stop();
totals();
.end
- [Gnash-commit] gnash ChangeLog server/vm/ActionExec.cpp server...,
Sandro Santilli <=