Changeset 48403 in webkit for trunk/JavaScriptCore/runtime/JSObject.h
- Timestamp:
- Sep 15, 2009, 4:17:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSObject.h
r48336 r48403 210 210 } 211 211 212 protected: 213 void addAnonymousSlots(unsigned count); 214 void putAnonymousValue(unsigned index, JSValue value) 215 { 216 *locationForOffset(index) = value; 217 } 218 JSValue getAnonymousValue(unsigned index) 219 { 220 return *locationForOffset(index); 221 } 222 212 223 private: 213 224 // Nobody should ever ask any of these questions on something already known to be a JSObject. … … 514 525 } 515 526 527 inline void JSObject::addAnonymousSlots(unsigned count) 528 { 529 size_t currentCapacity = m_structure->propertyStorageCapacity(); 530 RefPtr<Structure> structure = Structure::addAnonymousSlotsTransition(m_structure, count); 531 532 if (currentCapacity != structure->propertyStorageCapacity()) 533 allocatePropertyStorage(currentCapacity, structure->propertyStorageCapacity()); 534 535 setStructure(structure.release()); 536 } 537 516 538 inline void JSObject::putDirect(const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot) 517 539 {
Note:
See TracChangeset
for help on using the changeset viewer.