CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai <zoulunkai> 07/10/12 07:51:30
Modified files: . : ChangeLog server : swf_function.cpp Log message: * server/swf_function.cpp: use the caller's environment when the original target is destroyed. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4598&r2=1.4599 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.cpp?cvsroot=gnash&r1=1.37&r2=1.38 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4598 retrieving revision 1.4599 diff -u -b -r1.4598 -r1.4599 --- ChangeLog 12 Oct 2007 01:59:53 -0000 1.4598 +++ ChangeLog 12 Oct 2007 07:51:30 -0000 1.4599 @@ -1,5 +1,10 @@ 2007-10-12 Zou Lunkai <[EMAIL PROTECTED]> + * server/swf_function.cpp: use the caller's environment when the original + target is destroyed. + +2007-10-12 Zou Lunkai <[EMAIL PROTECTED]> + * testsuite/misc-swfc.all/opcode_guard_test2.sc: test that both setTarget and setTargetExpression use the target string instead of pointer for searching the target. Index: server/swf_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf_function.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- server/swf_function.cpp 9 Oct 2007 20:19:15 -0000 1.37 +++ server/swf_function.cpp 12 Oct 2007 07:51:30 -0000 1.38 @@ -168,8 +168,10 @@ as_environment* our_env = m_env; assert(our_env); - if (our_env == NULL) + if(our_env->get_original_target()->isDestroyed()) { + // if the original target is destroyed, we use the caller's environment. + // TODO: fix leaks here. our_env = &fn.env(); } //our_env = &fn.env(); // I think this should be it... _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit