Changeset 36401 in webkit for trunk/JavaScriptCore/kjs/JSObject.h
- Timestamp:
- Sep 14, 2008, 1:18:49 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSObject.h
r36368 r36401 151 151 } 152 152 153 void transitionTo(StructureID*); 154 153 155 void removeDirect(const Identifier& propertyName); 154 156 bool hasCustomProperties() { return !m_structureID->propertyMap().isEmpty(); } … … 179 181 bool usingInlineStorage() const { return m_propertyStorage == m_inlineStorage; } 180 182 183 static const size_t inlineStorageCapacity = 2; 184 181 185 protected: 182 186 bool getOwnPropertySlotForWrite(ExecState*, const Identifier&, PropertySlot&, bool& slotIsWriteable); … … 185 189 const HashEntry* findPropertyHashEntry(ExecState*, const Identifier& propertyName) const; 186 190 StructureID* createInheritorID(); 187 188 static const size_t inlineStorageCapacity = 2;189 191 190 192 RefPtr<StructureID> m_inheritorID; … … 390 392 } 391 393 392 393 394 395 396 397 398 399 400 394 unsigned currentAttributes; 395 size_t offset = m_structureID->propertyMap().getOffset(propertyName, currentAttributes); 396 if (offset != WTF::notFound) { 397 if (checkReadOnly && currentAttributes & ReadOnly) 398 return; 399 m_propertyStorage[offset] = value; 400 slot.setExistingProperty(this, offset); 401 return; 402 } 401 403 402 404 if (m_structureID->propertyMap().storageSize() == inlineStorageCapacity) … … 404 406 405 407 RefPtr<StructureID> structureID = StructureID::addPropertyTransition(m_structureID, propertyName, value, attributes, this, slot, m_propertyStorage); 408 slot.setWasTransition(true); 406 409 setStructureID(structureID.release()); 410 } 411 412 inline void JSObject::transitionTo(StructureID* newStructureID) 413 { 414 StructureID::transitionTo(m_structureID, newStructureID, this); 415 setStructureID(newStructureID); 407 416 } 408 417
Note:
See TracChangeset
for help on using the changeset viewer.