Changeset 95511 in webkit
- Timestamp:
- Sep 19, 2011 8:55:29 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r95510 r95511 1 2011-09-19 Geoffrey Garen <ggaren@apple.com> 2 3 Removed ENABLE_WTF_MULTIPLE_THREADS and related #ifdefs 4 https://bugs.webkit.org/show_bug.cgi?id=68423 5 6 As discussed on webkit-dev. All ports build with threads enabled in WTF now. 7 8 This may break WinCE and other ports that have not built and tested with 9 this configuration. I've filed bugs for port maintainers. It's time for 10 WebKit to move forward. 11 12 Reviewed by Mark Rowe. 13 14 * wtf/CryptographicallyRandomNumber.cpp: 15 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber): 16 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues): 17 * wtf/FastMalloc.cpp: 18 * wtf/Platform.h: 19 * wtf/RandomNumber.cpp: 20 (WTF::randomNumber): 21 * wtf/RefCountedLeakCounter.cpp: 22 (WTF::RefCountedLeakCounter::increment): 23 (WTF::RefCountedLeakCounter::decrement): 24 * wtf/ThreadingPthreads.cpp: 25 (WTF::initializeThreading): 26 * wtf/ThreadingWin.cpp: 27 (WTF::initializeThreading): 28 * wtf/dtoa.cpp: 29 (WTF::pow5mult): 30 * wtf/gtk/ThreadingGtk.cpp: 31 (WTF::initializeThreading): 32 * wtf/qt/ThreadingQt.cpp: 33 (WTF::initializeThreading): 34 1 35 2011-09-19 Geoffrey Garen <ggaren@apple.com> 2 36 -
trunk/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp
r92068 r95511 66 66 ARC4Stream m_stream; 67 67 int m_count; 68 #if ENABLE(WTF_MULTIPLE_THREADS)69 68 Mutex m_mutex; 70 #endif71 69 }; 72 70 … … 140 138 uint32_t ARC4RandomNumberGenerator::randomNumber() 141 139 { 142 #if ENABLE(WTF_MULTIPLE_THREADS)143 140 MutexLocker locker(m_mutex); 144 #endif145 141 146 142 m_count -= 4; … … 151 147 void ARC4RandomNumberGenerator::randomValues(void* buffer, size_t length) 152 148 { 153 #if ENABLE(WTF_MULTIPLE_THREADS)154 149 MutexLocker locker(m_mutex); 155 #endif156 150 157 151 unsigned char* result = reinterpret_cast<unsigned char*>(buffer); -
trunk/Source/JavaScriptCore/wtf/FastMalloc.cpp
r94952 r95511 80 80 #include "Assertions.h" 81 81 #include <limits> 82 #if ENABLE(WTF_MULTIPLE_THREADS)83 82 #if OS(WINDOWS) && PLATFORM(CHROMIUM) || OS(WINCE) && PLATFORM(WIN) 84 83 #include <windows.h> … … 86 85 #include <pthread.h> 87 86 #endif // OS(WINDOWS) && PLATFORM(CHROMIUM) || OS(WINCE) && PLATFORM(WIN) 88 #endif89 87 #include <wtf/StdLibExtras.h> 88 #include <string.h> 90 89 91 90 #ifndef NO_TCMALLOC_SAMPLES … … 107 106 namespace WTF { 108 107 109 #if ENABLE(WTF_MULTIPLE_THREADS)110 108 #if OS(WINDOWS) && PLATFORM(CHROMIUM) || OS(WINCE) && PLATFORM(WIN) 111 109 … … 172 170 } 173 171 #endif // OS(WINDOWS) && PLATFORM(CHROMIUM) || OS(WINCE) && PLATFORM(WIN) 174 #else175 176 static bool staticIsForbidden;177 static bool isForbidden()178 {179 return staticIsForbidden;180 }181 182 void fastMallocForbid()183 {184 staticIsForbidden = true;185 }186 187 void fastMallocAllow()188 {189 staticIsForbidden = false;190 }191 #endif // ENABLE(WTF_MULTIPLE_THREADS)192 172 193 173 } // namespace WTF 194 174 #endif // NDEBUG 195 196 #include <string.h>197 175 198 176 namespace WTF { -
trunk/Source/JavaScriptCore/wtf/Platform.h
r95510 r95511 509 509 #endif 510 510 511 #if !defined(ENABLE_WTF_MULTIPLE_THREADS)512 #define ENABLE_WTF_MULTIPLE_THREADS 1513 #endif514 515 511 /* On Windows, use QueryPerformanceCounter by default */ 516 512 #if OS(WINDOWS) -
trunk/Source/JavaScriptCore/wtf/RandomNumber.cpp
r84466 r95511 62 62 // define USE(OS_RANDOMNESS). 63 63 64 #if !ENABLE(WTF_MULTIPLE_THREADS)65 static bool s_initialized = false;66 if (!s_initialized) {67 initializeRandomNumberGenerator();68 s_initialized = true;69 }70 #endif71 72 64 #if USE(MERSENNE_TWISTER_19937) 73 65 return genrand_res53(); -
trunk/Source/JavaScriptCore/wtf/RefCountedLeakCounter.cpp
r84466 r95511 80 80 void RefCountedLeakCounter::increment() 81 81 { 82 #if ENABLE(WTF_MULTIPLE_THREADS)83 82 atomicIncrement(&m_count); 84 #else85 ++m_count;86 #endif87 83 } 88 84 89 85 void RefCountedLeakCounter::decrement() 90 86 { 91 #if ENABLE(WTF_MULTIPLE_THREADS)92 87 atomicDecrement(&m_count); 93 #else94 --m_count;95 #endif96 88 } 97 89 -
trunk/Source/JavaScriptCore/wtf/ThreadingPthreads.cpp
r94452 r95511 84 84 ThreadIdentifierData::initializeOnce(); 85 85 wtfThreadData(); 86 #if ENABLE(WTF_MULTIPLE_THREADS)87 86 s_dtoaP5Mutex = new Mutex; 88 87 initializeDates(); 89 #endif90 88 } 91 89 -
trunk/Source/JavaScriptCore/wtf/ThreadingWin.cpp
r94452 r95511 173 173 initializeRandomNumberGenerator(); 174 174 wtfThreadData(); 175 #if ENABLE(WTF_MULTIPLE_THREADS)176 175 s_dtoaP5Mutex = new Mutex; 177 176 initializeDates(); 178 #endif179 180 177 } 181 178 -
trunk/Source/JavaScriptCore/wtf/dtoa.cpp
r94452 r95511 91 91 namespace WTF { 92 92 93 #if ENABLE(WTF_MULTIPLE_THREADS)94 93 Mutex* s_dtoaP5Mutex; 95 #endif96 94 97 95 typedef union { … … 436 434 return; 437 435 438 #if ENABLE(WTF_MULTIPLE_THREADS)439 436 s_dtoaP5Mutex->lock(); 440 #endif441 437 P5Node* p5 = p5s; 442 438 … … 451 447 452 448 int p5sCountLocal = p5sCount; 453 #if ENABLE(WTF_MULTIPLE_THREADS)454 449 s_dtoaP5Mutex->unlock(); 455 #endif456 450 int p5sUsed = 0; 457 451 … … 464 458 465 459 if (++p5sUsed == p5sCountLocal) { 466 #if ENABLE(WTF_MULTIPLE_THREADS)467 460 s_dtoaP5Mutex->lock(); 468 #endif469 461 if (p5sUsed == p5sCount) { 470 462 ASSERT(!p5->next); … … 477 469 478 470 p5sCountLocal = p5sCount; 479 #if ENABLE(WTF_MULTIPLE_THREADS)480 471 s_dtoaP5Mutex->unlock(); 481 #endif482 472 } 483 473 p5 = p5->next; -
trunk/Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
r93004 r95511 71 71 initializeRandomNumberGenerator(); 72 72 wtfThreadData(); 73 #if ENABLE(WTF_MULTIPLE_THREADS)74 73 s_dtoaP5Mutex = new Mutex; 75 74 initializeDates(); 76 #endif77 75 } 78 76 } -
trunk/Source/JavaScriptCore/wtf/qt/ThreadingQt.cpp
r94890 r95511 150 150 initializeRandomNumberGenerator(); 151 151 wtfThreadData(); 152 #if ENABLE(WTF_MULTIPLE_THREADS)153 152 s_dtoaP5Mutex = new Mutex; 154 153 initializeDates(); 155 #endif156 157 154 } 158 155 }
Note: See TracChangeset
for help on using the changeset viewer.