Changeset 34412 in webkit for trunk/JavaScriptCore/kjs/CommonIdentifiers.cpp
- Timestamp:
- Jun 6, 2008, 11:03:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/CommonIdentifiers.cpp
r33979 r34412 22 22 #include "CommonIdentifiers.h" 23 23 24 #if USE(MULTIPLE_THREADS)25 #include <wtf/ThreadSpecific.h>26 using namespace WTF;27 #endif28 29 24 namespace KJS { 30 25 31 26 const char* const nullCString = 0; 32 27 33 #define INITIALIZE_PROPERTY_NAME(name) , name ( #name)28 #define INITIALIZE_PROPERTY_NAME(name) , name(globalData, #name) 34 29 35 CommonIdentifiers::CommonIdentifiers( )36 : nullIdentifier( nullCString)37 , underscoreProto( "__proto__")38 , thisIdentifier( "this")30 CommonIdentifiers::CommonIdentifiers(JSGlobalData* globalData) 31 : nullIdentifier(globalData, nullCString) 32 , underscoreProto(globalData, "__proto__") 33 , thisIdentifier(globalData, "this") 39 34 KJS_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PROPERTY_NAME) 40 35 { 41 36 } 42 37 43 CommonIdentifiers* CommonIdentifiers::shared()44 {45 #if USE(MULTIPLE_THREADS)46 static ThreadSpecific<CommonIdentifiers> sharedInstance;47 return sharedInstance;48 #else49 static CommonIdentifiers sharedInstance;50 return &sharedInstance;51 #endif52 }53 54 38 } // namespace KJS
Note:
See TracChangeset
for help on using the changeset viewer.