Changeset 92145 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Oct 29, 2021 1:00:02 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147966
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/VirtualBoxTranslator.cpp
r92115 r92145 16 16 */ 17 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_MAIN_VIRTUALBOXCLIENT /** @todo add separate logging group! */ 23 #include "LoggingNew.h" 24 18 25 #include <iprt/asm.h> 19 26 #include <iprt/ctype.h> … … 31 38 #include "VirtualBoxTranslator.h" 32 39 40 41 /********************************************************************************************************************************* 42 * Defined Constants And Macros * 43 *********************************************************************************************************************************/ 33 44 #define TRANSLATOR_CACHE_SIZE 32 34 45 46 47 /********************************************************************************************************************************* 48 * Global Variables * 49 *********************************************************************************************************************************/ 35 50 /** Init once for the critical section. */ 36 51 static RTONCE g_Once = RTONCE_INITIALIZER; … … 42 57 static RTTLS g_idxTlsSrc = NIL_RTTLS; 43 58 59 60 44 61 /** 45 62 * @callback_method_impl{FNRTONCE} … … 65 82 if (RT_FAILURE(rc)) 66 83 m_hStrCache = NIL_RTSTRCACHE; /* (loadLanguage will fail) */ 84 LogFlowFunc(("m_rcCache=%Rrc g_idxTlsTr=%#x g_idxTlsSrc=%#x\n", m_rcCache, g_idxTlsTr, g_idxTlsSrc)); 67 85 } 68 86 … … 70 88 VirtualBoxTranslator::~VirtualBoxTranslator() 71 89 { 90 LogFlowFunc(("enter\n")); 91 92 /* Write-lock the object as we could be racing language change 93 notifications processing during XPCOM shutdown. (risky?) */ 94 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 95 72 96 RTTlsFree(g_idxTlsTr); 73 97 g_idxTlsTr = NIL_RTTLS; … … 91 115 m_rcCache = VERR_WRONG_ORDER; 92 116 } 117 LogFlowFunc(("returns\n")); 93 118 } 94 119 … … 203 228 int VirtualBoxTranslator::i_loadLanguage(const char *pszLang) 204 229 { 230 LogFlowFunc(("pszLang=%s\n", pszLang)); 205 231 int rc = VINF_SUCCESS; 206 232 char szLocale[256]; … … 241 267 { 242 268 AssertReturn(aComponent, VERR_INVALID_PARAMETER); 269 LogFlow(("aComponent=%s aLang=%s\n", aComponent->strPath.c_str(), aLang)); 270 243 271 int rc; 244 272 if (strcmp(aLang, "C") != 0)
Note:
See TracChangeset
for help on using the changeset viewer.