Changeset 27294 in webkit for trunk/JavaScriptCore/wtf/FastMalloc.cpp
- Timestamp:
- Oct 31, 2007, 12:18:46 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r26760 r27294 191 191 #include <stdio.h> 192 192 #include <string.h> 193 #if COMPILER(MSVC) 194 #define WIN32_LEAN_AND_MEAN 195 #include <windows.h> 196 #endif 193 197 194 198 #if WTF_CHANGES … … 1294 1298 static pthread_key_t heap_key; 1295 1299 #if COMPILER(MSVC) 1296 __declspec(thread) TCMalloc_ThreadCache* threadHeap;1300 DWORD tlsIndex = TLS_OUT_OF_INDEXES; 1297 1301 #endif 1298 1302 … … 1300 1304 { 1301 1305 #if COMPILER(MSVC) 1302 return threadHeap;1306 return static_cast<TCMalloc_ThreadCache*>(TlsGetValue(tlsIndex)); 1303 1307 #else 1304 1308 return static_cast<TCMalloc_ThreadCache*>(pthread_getspecific(heap_key)); … … 1312 1316 pthread_setspecific(heap_key, heap); 1313 1317 #if COMPILER(MSVC) 1314 threadHeap = heap;1318 TlsSetValue(tlsIndex, heap); 1315 1319 #endif 1316 1320 } … … 1643 1647 ASSERT(!tsd_inited); 1644 1648 pthread_key_create(&heap_key, DeleteCache); 1649 #if COMPILER(MSVC) 1650 tlsIndex = TlsAlloc(); 1651 #endif 1645 1652 tsd_inited = true; 1646 1653
Note:
See TracChangeset
for help on using the changeset viewer.