Changeset 37684 in webkit for trunk/JavaScriptCore/kjs/JSGlobalObject.cpp
- Timestamp:
- Oct 18, 2008, 6:52:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSGlobalObject.cpp
r37681 r37684 79 79 static const int preferredScriptCheckTimeInterval = 1000; 80 80 81 static inline void markIfNeeded(JSValue *v)81 static inline void markIfNeeded(JSValuePtr v) 82 82 { 83 83 if (v && !v->marked()) … … 148 148 } 149 149 150 void JSGlobalObject::put(ExecState* exec, const Identifier& propertyName, JSValue *value, PutPropertySlot& slot)150 void JSGlobalObject::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot) 151 151 { 152 152 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 157 157 } 158 158 159 void JSGlobalObject::putWithAttributes(ExecState* exec, const Identifier& propertyName, JSValue *value, unsigned attributes)159 void JSGlobalObject::putWithAttributes(ExecState* exec, const Identifier& propertyName, JSValuePtr value, unsigned attributes) 160 160 { 161 161 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); … … 164 164 return; 165 165 166 JSValue *valueBefore = getDirect(propertyName);166 JSValuePtr valueBefore = getDirect(propertyName); 167 167 PutPropertySlot slot; 168 168 JSVariableObject::put(exec, propertyName, value, slot); 169 169 if (!valueBefore) { 170 if (JSValue *valueAfter = getDirect(propertyName))170 if (JSValuePtr valueAfter = getDirect(propertyName)) 171 171 putDirect(propertyName, valueAfter, attributes); 172 172 } … … 195 195 } 196 196 197 void JSGlobalObject::reset(JSValue *prototype)197 void JSGlobalObject::reset(JSValuePtr prototype) 198 198 { 199 199 ExecState* exec = JSGlobalObject::globalExec(); … … 240 240 // Constructors 241 241 242 JSValue *objectConstructor = new (exec) ObjectConstructor(exec, ObjectConstructor::createStructureID(d()->functionPrototype), d()->objectPrototype);243 JSValue *functionConstructor = new (exec) FunctionConstructor(exec, FunctionConstructor::createStructureID(d()->functionPrototype), d()->functionPrototype);244 JSValue *arrayConstructor = new (exec) ArrayConstructor(exec, ArrayConstructor::createStructureID(d()->functionPrototype), d()->arrayPrototype);245 JSValue *stringConstructor = new (exec) StringConstructor(exec, StringConstructor::createStructureID(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->stringPrototype);246 JSValue *booleanConstructor = new (exec) BooleanConstructor(exec, BooleanConstructor::createStructureID(d()->functionPrototype), d()->booleanPrototype);247 JSValue *numberConstructor = new (exec) NumberConstructor(exec, NumberConstructor::createStructureID(d()->functionPrototype), d()->numberPrototype);248 JSValue *dateConstructor = new (exec) DateConstructor(exec, DateConstructor::createStructureID(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->datePrototype);242 JSValuePtr objectConstructor = new (exec) ObjectConstructor(exec, ObjectConstructor::createStructureID(d()->functionPrototype), d()->objectPrototype); 243 JSValuePtr functionConstructor = new (exec) FunctionConstructor(exec, FunctionConstructor::createStructureID(d()->functionPrototype), d()->functionPrototype); 244 JSValuePtr arrayConstructor = new (exec) ArrayConstructor(exec, ArrayConstructor::createStructureID(d()->functionPrototype), d()->arrayPrototype); 245 JSValuePtr stringConstructor = new (exec) StringConstructor(exec, StringConstructor::createStructureID(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->stringPrototype); 246 JSValuePtr booleanConstructor = new (exec) BooleanConstructor(exec, BooleanConstructor::createStructureID(d()->functionPrototype), d()->booleanPrototype); 247 JSValuePtr numberConstructor = new (exec) NumberConstructor(exec, NumberConstructor::createStructureID(d()->functionPrototype), d()->numberPrototype); 248 JSValuePtr dateConstructor = new (exec) DateConstructor(exec, DateConstructor::createStructureID(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->datePrototype); 249 249 250 250 d()->regExpConstructor = new (exec) RegExpConstructor(exec, RegExpConstructor::createStructureID(d()->functionPrototype), d()->regExpPrototype); … … 332 332 333 333 // Set prototype, and also insert the object prototype at the end of the chain. 334 void JSGlobalObject::resetPrototype(JSValue *prototype)334 void JSGlobalObject::resetPrototype(JSValuePtr prototype) 335 335 { 336 336 setPrototype(prototype);
Note:
See TracChangeset
for help on using the changeset viewer.