Changeset 34947 in webkit for trunk/JavaScriptCore/kjs/JSGlobalData.cpp
- Timestamp:
- Jul 2, 2008, 12:00:53 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSGlobalData.cpp
r34907 r34947 57 57 58 58 59 JSGlobalData::JSGlobalData( )59 JSGlobalData::JSGlobalData(bool isShared) 60 60 : machine(new Machine) 61 , heap(new Heap )61 , heap(new Heap(isShared)) 62 62 #if USE(MULTIPLE_THREADS) 63 63 , arrayTable(new HashTable(KJS::arrayTable)) … … 84 84 , parser(new Parser) 85 85 , head(0) 86 , isSharedInstance(isShared) 86 87 { 87 88 } … … 133 134 { 134 135 #if USE(MULTIPLE_THREADS) 135 AtomicallyInitializedStatic(JSGlobalData, sharedInstance); 136 #else 137 static JSGlobalData sharedInstance; 136 MutexLocker locker(*atomicallyInitializedStaticMutex); 138 137 #endif 139 return sharedInstance; 138 static JSGlobalData* sharedInstance; 139 if (!sharedInstance) 140 sharedInstance = new JSGlobalData(true); 141 return *sharedInstance; 140 142 } 141 143
Note:
See TracChangeset
for help on using the changeset viewer.