Changeset 58133 in webkit for trunk/JavaScriptCore/runtime/JSGlobalData.cpp
- Timestamp:
- Apr 22, 2010, 5:11:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSGlobalData.cpp
r58114 r58133 104 104 } 105 105 106 JSGlobalData::JSGlobalData( bool isShared, ThreadStackType threadStackType)107 : isSharedInstance(isShared)106 JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType threadStackType) 107 : globalDataType(globalDataType) 108 108 , clientData(0) 109 109 , arrayTable(fastNew<HashTable>(JSC::arrayTable)) … … 129 129 , numberStructure(JSNumberCell::createStructure(jsNull())) 130 130 #endif 131 , identifierTable( createIdentifierTable())131 , identifierTable(globalDataType == Default ? wtfThreadData().currentIdentifierTable() : createIdentifierTable()) 132 132 , literalTable(createLiteralTable()) 133 133 , propertyNames(new CommonIdentifiers(this)) … … 194 194 195 195 delete propertyNames; 196 deleteIdentifierTable(identifierTable); 196 if (globalDataType != Default) 197 deleteIdentifierTable(identifierTable); 197 198 deleteLiteralTable(literalTable); 198 199 … … 200 201 } 201 202 202 PassRefPtr<JSGlobalData> JSGlobalData::create NonDefault(ThreadStackType type)203 { 204 return adoptRef(new JSGlobalData( false, type));203 PassRefPtr<JSGlobalData> JSGlobalData::createContextGroup(ThreadStackType type) 204 { 205 return adoptRef(new JSGlobalData(APIContextGroup, type)); 205 206 } 206 207 207 208 PassRefPtr<JSGlobalData> JSGlobalData::create(ThreadStackType type) 208 209 { 209 JSGlobalData* globalData = new JSGlobalData(false, type); 210 wtfThreadData().initializeIdentifierTable(globalData->identifierTable); 211 return adoptRef(globalData); 210 return adoptRef(new JSGlobalData(Default, type)); 212 211 } 213 212 … … 229 228 JSGlobalData*& instance = sharedInstanceInternal(); 230 229 if (!instance) { 231 instance = new JSGlobalData( true, ThreadStackTypeSmall);230 instance = new JSGlobalData(APIShared, ThreadStackTypeSmall); 232 231 #if ENABLE(JSC_MULTIPLE_THREADS) 233 232 instance->makeUsableFromMultipleThreads();
Note:
See TracChangeset
for help on using the changeset viewer.