From 8b8ef8d6331d84638bc253cb7d06faf37e0cc1b3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 31 Oct 2013 12:45:04 +0100 Subject: Remove the xmloff::token::ResetTokens race condition ...where multiple parallel calls to xmloff::token::ResetTokens or xmloff::token::GetXMLToken can see dangling pOUString pointers. There is no point in releasing this (bounded) amount of memory referenced from global aTokenList, anyway. There is still a race when parallel calls to xmloff::token::GetXMLToken write to a pOUString pointer in parallel, but that's more harmless, and maybe calls to GetXMLToken are synchronized by Solar Mutex? Calls to ResetTokens (e.g., via URP remote release request -> ~ScXMLExport -> ~SvXMLExport) were definitely /not/ synchronized via any mutex. The xmloff::token::Inc/DecRescheduleCount functions are now pointless and have been removed, too. Change-Id: I85905d4de1f042ed5c9a37589f942910d8ef80fd --- include/xmloff/xmltoken.hxx | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 265a2e5c06b2..360a01b3d1c9 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -3227,15 +3227,6 @@ namespace xmloff { namespace token { XMLOFF_DLLPUBLIC sal_Bool IsXMLToken( const OUString& rString, enum XMLTokenEnum eToken ); - - // gives all allocated memory for OUString* back - XMLOFF_DLLPUBLIC void ResetTokens(); - - XMLOFF_DLLPUBLIC void IncRescheduleCount(); - - XMLOFF_DLLPUBLIC void DecRescheduleCount(); - - } } #endif -- cgit