Changeset 41626 in webkit for trunk/JavaScriptCore/wtf/ThreadingWin.cpp
- Timestamp:
- Mar 12, 2009, 8:01:46 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/ThreadingWin.cpp
r41605 r41626 99 99 namespace WTF { 100 100 101 // MS_VC_EXCEPTION, THREADNAME_INFO, and setThreadName all come from <http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>.101 // MS_VC_EXCEPTION, THREADNAME_INFO, and setThreadNameInternal all come from <http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>. 102 102 static const DWORD MS_VC_EXCEPTION = 0x406D1388; 103 103 … … 111 111 #pragma pack(pop) 112 112 113 static void setThreadName(DWORD dwThreadID, LPCSTR szThreadName) 114 { 115 // Visual Studio has a 31-character limit on thread names. Longer names will 116 // be truncated silently, but we'd like callers to know about the limit. 117 ASSERT_ARG(szThreadName, strlen(szThreadName) <= 31); 118 113 void setThreadNameInternal(const char* szThreadName) 114 { 119 115 THREADNAME_INFO info; 120 116 info.dwType = 0x1000; 121 117 info.szName = szThreadName; 122 info.dwThreadID = dwThreadID;118 info.dwThreadID = GetCurrentThreadId(); 123 119 info.dwFlags = 0; 124 120 … … 158 154 initializeMainThread(); 159 155 mainThreadIdentifier = currentThread(); 160 setThreadName (mainThreadIdentifier,"Main Thread");156 setThreadNameInternal("Main Thread"); 161 157 } 162 158 } … … 221 217 } 222 218 223 if (threadName)224 setThreadName(threadIdentifier, threadName);225 226 219 threadID = static_cast<ThreadIdentifier>(threadIdentifier); 227 220 storeThreadHandleByIdentifier(threadIdentifier, threadHandle); 228 221 229 222 return threadID; 230 }231 232 void setThreadNameInternal(const char*)233 {234 223 } 235 224
Note:
See TracChangeset
for help on using the changeset viewer.