CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/12/03 10:53:22
Modified files: . : ChangeLog server/parser : movie_def_impl.cpp movie_def_impl.h Log message: mutex-protect characters dictionary. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5062&r2=1.5063 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.cpp?cvsroot=gnash&r1=1.91&r2=1.92 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.h?cvsroot=gnash&r1=1.62&r2=1.63 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5062 retrieving revision 1.5063 diff -u -b -r1.5062 -r1.5063 --- ChangeLog 3 Dec 2007 08:35:34 -0000 1.5062 +++ ChangeLog 3 Dec 2007 10:53:22 -0000 1.5063 @@ -1,5 +1,7 @@ 2007-12-03 Sandro Santilli <[EMAIL PROTECTED]> + * server/parser/movie_def_impl.{cpp,h}: mutex-protect + characters dictionary. * libbase/BitsReader.h, libmedia/AudioDecoderSimple.cpp: renamed BitsReader::got_bits to gotBits (style). * testsuite/swfdec/PASSING: countdown.swf succeeds after zou commit Index: server/parser/movie_def_impl.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.cpp,v retrieving revision 1.91 retrieving revision 1.92 diff -u -b -r1.91 -r1.92 --- server/parser/movie_def_impl.cpp 1 Dec 2007 01:08:09 -0000 1.91 +++ server/parser/movie_def_impl.cpp 3 Dec 2007 10:53:22 -0000 1.92 @@ -314,6 +314,7 @@ void movie_def_impl::add_character(int character_id, character_def* c) { assert(c); + boost::mutex::scoped_lock lock(_dictionaryMutex); _dictionary.add_character(character_id, c); } @@ -329,6 +330,8 @@ } #endif // not NDEBUG + boost::mutex::scoped_lock lock(_dictionaryMutex); + boost::intrusive_ptr<character_def> ch = _dictionary.get_character(character_id); #ifndef GNASH_USE_GC assert(ch == NULL || ch->get_ref_count() > 1); @@ -1039,6 +1042,7 @@ (*i)->setReachable(); } + boost::mutex::scoped_lock lock(_dictionaryMutex); _dictionary.markReachableResources(); } Index: server/parser/movie_def_impl.h =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.h,v retrieving revision 1.62 retrieving revision 1.63 diff -u -b -r1.62 -r1.63 --- server/parser/movie_def_impl.h 1 Dec 2007 01:08:09 -0000 1.62 +++ server/parser/movie_def_impl.h 3 Dec 2007 10:53:22 -0000 1.63 @@ -197,6 +197,9 @@ /// Characters Dictionary CharacterDictionary _dictionary; + /// Mutex protecting _dictionary + mutable boost::mutex _dictionaryMutex; + /// Tags loader table SWF::TagLoadersTable& _tag_loaders; _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit