Changeset 31936 in webkit for trunk/JavaScriptCore/kjs/CommonIdentifiers.cpp
- Timestamp:
- Apr 16, 2008, 2:30:01 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/CommonIdentifiers.cpp
r29663 r31936 22 22 #include "CommonIdentifiers.h" 23 23 24 #if USE(MULTIPLE_THREADS) 25 #include <wtf/ThreadSpecific.h> 26 #endif 27 24 28 namespace KJS { 25 29 … … 37 41 CommonIdentifiers* CommonIdentifiers::shared() 38 42 { 39 static CommonIdentifiers* sharedInstance; 40 if (!sharedInstance) { 41 JSLock lock; 42 sharedInstance = new CommonIdentifiers; 43 } 43 #if USE(MULTIPLE_THREADS) 44 static ThreadSpecific<CommonIdentifiers> sharedInstance; 44 45 return sharedInstance; 46 #else 47 static CommonIdentifiers sharedInstance; 48 return &sharedInstance; 49 #endif 45 50 } 46 51
Note:
See TracChangeset
for help on using the changeset viewer.