Changeset 58133 in webkit for trunk/JavaScriptCore/runtime/JSGlobalData.h
- Timestamp:
- Apr 22, 2010, 5:11:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSGlobalData.h
r58114 r58133 93 93 class JSGlobalData : public RefCounted<JSGlobalData> { 94 94 public: 95 // WebCore has a one-to-one mapping of threads to JSGlobalDatas; 96 // either create() or createLeaked() should only be called once 97 // on a thread, this is the 'default' JSGlobalData (it uses the 98 // thread's default string uniquing table from wtfThreadData). 99 // API contexts created using the new context group aware interface 100 // create APIContextGroup objects which require less locking of JSC 101 // than the old singleton APIShared JSGlobalData created for use by 102 // the original API. 103 enum GlobalDataType { Default, APIContextGroup, APIShared }; 104 95 105 struct ClientData { 96 106 virtual ~ClientData() = 0; 97 107 }; 98 108 109 bool isSharedInstance() { return globalDataType == APIShared; } 99 110 static bool sharedInstanceExists(); 100 111 static JSGlobalData& sharedInstance(); … … 102 113 static PassRefPtr<JSGlobalData> create(ThreadStackType); 103 114 static PassRefPtr<JSGlobalData> createLeaked(ThreadStackType); 104 static PassRefPtr<JSGlobalData> create NonDefault(ThreadStackType);115 static PassRefPtr<JSGlobalData> createContextGroup(ThreadStackType); 105 116 ~JSGlobalData(); 106 117 … … 110 121 #endif 111 122 112 bool isSharedInstance;123 GlobalDataType globalDataType; 113 124 ClientData* clientData; 114 125 … … 206 217 void dumpSampleData(ExecState* exec); 207 218 private: 208 JSGlobalData( bool isShared, ThreadStackType);219 JSGlobalData(GlobalDataType, ThreadStackType); 209 220 static JSGlobalData*& sharedInstanceInternal(); 210 221 void createNativeThunk();
Note:
See TracChangeset
for help on using the changeset viewer.