Changeset 32652 in webkit for trunk/JavaScriptCore/kjs/JSGlobalObject.h
- Timestamp:
- Apr 28, 2008, 11:22:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSGlobalObject.h
r32587 r32652 43 43 class FunctionObjectImp; 44 44 class FunctionPrototype; 45 struct HashTable; 45 46 class JSGlobalObject; 46 47 class NativeErrorImp; … … 68 69 class UriErrorPrototype; 69 70 struct ActivationStackNode; 71 struct ThreadClassInfoHashTables; 70 72 71 73 typedef Vector<ExecState*, 16> ExecStateStack; … … 76 78 77 79 struct JSGlobalObjectData : public JSVariableObjectData { 78 JSGlobalObjectData( JSGlobalObject* globalObject, JSObject* thisValue)80 JSGlobalObjectData() 79 81 : JSVariableObjectData(&inlineSymbolTable) 80 , globalExec(globalObject, thisValue)81 82 { 82 83 } … … 87 88 Debugger* debugger; 88 89 89 GlobalExecStateglobalExec;90 OwnPtr<GlobalExecState> globalExec; 90 91 int recursion; 91 92 … … 141 142 142 143 OwnPtr<HashSet<JSObject*> > arrayVisitedElements; // Global data shared by array prototype functions. 144 145 PerThreadData perThreadData; 143 146 }; 144 147 145 148 public: 146 149 JSGlobalObject() 147 : JSVariableObject(new JSGlobalObjectData (this, this))150 : JSVariableObject(new JSGlobalObjectData) 148 151 { 149 init( );152 init(this); 150 153 } 151 154 152 155 protected: 153 156 JSGlobalObject(JSValue* proto, JSObject* globalThisValue) 154 : JSVariableObject(proto, new JSGlobalObjectData (this, globalThisValue))157 : JSVariableObject(proto, new JSGlobalObjectData) 155 158 { 156 init( );159 init(globalThisValue); 157 160 } 158 161 … … 247 250 HashSet<JSObject*>& arrayVisitedElements() { if (!d()->arrayVisitedElements) d()->arrayVisitedElements.set(new HashSet<JSObject*>); return *d()->arrayVisitedElements; } 248 251 252 // Per-thread hash tables, cached on the global object for faster access. 253 const PerThreadData* perThreadData() const { return &d()->perThreadData; } 254 255 // Initialize and/or retrieve per-thread hash tables - use perThreadData() for faster access instead. 256 static ThreadClassInfoHashTables* threadClassInfoHashTables(); 257 249 258 private: 250 void init( );259 void init(JSObject* thisValue); 251 260 252 261 JSGlobalObjectData* d() const { return static_cast<JSGlobalObjectData*>(JSVariableObject::d); }
Note:
See TracChangeset
for help on using the changeset viewer.