Changeset 41594 in webkit for trunk/JavaScriptCore/wtf/ThreadSpecificWin.cpp
- Timestamp:
- Mar 11, 2009, 1:39:21 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/ThreadSpecificWin.cpp
r39708 r41594 30 30 namespace WTF { 31 31 32 long g_tls_key_count = 0; 33 DWORD g_tls_keys[kMaxTlsKeySize]; 32 long& tlsKeyCount() 33 { 34 static long count; 35 return count; 36 } 37 38 DWORD* tlsKeys() 39 { 40 static DWORD keys[kMaxTlsKeySize]; 41 return keys; 42 } 34 43 35 44 void ThreadSpecificThreadExit() 36 45 { 37 for (long i = 0; i < g_tls_key_count; i++) {46 for (long i = 0; i < tlsKeyCount(); i++) { 38 47 // The layout of ThreadSpecific<T>::Data does not depend on T. So we are safe to do the static cast to ThreadSpecific<int> in order to access its data member. 39 ThreadSpecific<int>::Data* data = static_cast<ThreadSpecific<int>::Data*>(TlsGetValue( g_tls_keys[i]));48 ThreadSpecific<int>::Data* data = static_cast<ThreadSpecific<int>::Data*>(TlsGetValue(tlsKeys()[i])); 40 49 if (data) 41 50 data->destructor(data);
Note:
See TracChangeset
for help on using the changeset viewer.