CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/09/27 17:23:18
Modified files: . : ChangeLog server : as_object.cpp testsuite/actionscript.all: String.as Log message: * server/as_object.cpp (setPropFlags): properly convert the properties to lowercase for SWF < 7. * testsuite/actionscript.all/String.as: successes in unprotecting {String,Object}.prototype.toString from deletion. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4448&r2=1.4449 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.65&r2=1.66 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.21&r2=1.22 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4448 retrieving revision 1.4449 diff -u -b -r1.4448 -r1.4449 --- ChangeLog 27 Sep 2007 16:54:48 -0000 1.4448 +++ ChangeLog 27 Sep 2007 17:23:17 -0000 1.4449 @@ -1,5 +1,12 @@ 2007-09-27 Sandro Santilli <[EMAIL PROTECTED]> + * server/as_object.cpp (setPropFlags): properly convert the properties + to lowercase for SWF < 7. + * testsuite/actionscript.all/String.as: successes in unprotecting + {String,Object}.prototype.toString from deletion. + +2007-09-27 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/actionscript.all/String.as: tests for toString and it's deletion/unprotection from deletion (succeeds from SWF7 and higher, fails up to SWF6) Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -u -b -r1.65 -r1.66 --- server/as_object.cpp 26 Sep 2007 12:09:07 -0000 1.65 +++ server/as_object.cpp 27 Sep 2007 17:23:17 -0000 1.66 @@ -413,7 +413,12 @@ { if (props_val.is_string()) { - std::string propstr = props_val.to_string(); + std::string propstr = props_val.to_string(); // no need for calling toString here.. + if ( _vm.getSWFVersion() < 7 ) // convert to lower case if required + { + boost::to_lower(propstr); + } + for(;;) { std::string prop; Index: testsuite/actionscript.all/String.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- testsuite/actionscript.all/String.as 27 Sep 2007 16:54:49 -0000 1.21 +++ testsuite/actionscript.all/String.as 27 Sep 2007 17:23:18 -0000 1.22 @@ -16,7 +16,7 @@ // Original author: Mike Carlson - June 19th, 2006 -rcsid="$Id: String.as,v 1.21 2007/09/27 16:54:49 strk Exp $"; +rcsid="$Id: String.as,v 1.22 2007/09/27 17:23:18 strk Exp $"; #include "check.as" @@ -330,22 +330,13 @@ check(! delete String.prototype.toString); ASSetPropFlags(String.prototype, "toString", 0, 7); // unprotect from deletion StringProtoToStringBackup = String.prototype.toString; -#if OUTPUT_VERSION < 7 - xcheck(delete String.prototype.toString); -#else - check(delete String.prototype.toString); -#endif +check(delete String.prototype.toString); check_equals(typeof(s.toString), 'function'); check(!delete Object.prototype.toString); ASSetPropFlags(Object.prototype, "toString", 0, 7); // unprotect from deletion ObjectProtoToStringBackup = Object.prototype.toString; -#if OUTPUT_VERSION < 7 - xcheck(delete Object.prototype.toString); - xcheck_equals(typeof(s.toString), 'undefined'); -#else - check(delete Object.prototype.toString); - check_equals(typeof(s.toString), 'undefined'); -#endif +check(delete Object.prototype.toString); +check_equals(typeof(s.toString), 'undefined'); Object.prototype.toString = ObjectProtoToStringBackup; String.prototype.toString = StringProtoToStringBackup; _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit