Changeset 37381 in webkit for trunk/JavaScriptCore/kjs/JSObject.cpp
- Timestamp:
- Oct 7, 2008, 11:17:37 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSObject.cpp
r37370 r37381 135 135 136 136 unsigned attributes; 137 if ((m_structureID->propertyMap().get (propertyName, attributes) != WTF::notFound) && attributes & ReadOnly)137 if ((m_structureID->propertyMap().getOffset(propertyName, attributes) != WTF::notFound) && attributes & ReadOnly) 138 138 return; 139 139 … … 201 201 { 202 202 unsigned attributes; 203 if (m_structureID->propertyMap().get (propertyName, attributes) != WTF::notFound) {203 if (m_structureID->propertyMap().getOffset(propertyName, attributes) != WTF::notFound) { 204 204 if ((attributes & DontDelete)) 205 205 return false; … … 413 413 bool JSObject::getPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const 414 414 { 415 if (m_structureID->propertyMap().get (propertyName, attributes) != WTF::notFound)415 if (m_structureID->propertyMap().getOffset(propertyName, attributes) != WTF::notFound) 416 416 return true; 417 417 … … 469 469 void JSObject::removeDirect(const Identifier& propertyName) 470 470 { 471 size_t offset;472 471 if (m_structureID->isDictionary()) { 473 offset = m_structureID->propertyMap().remove(propertyName); 474 if (offset != WTF::notFound) { 475 m_propertyStorage[offset] = jsUndefined(); 476 m_structureID->clearEnumerationCache(); 477 } 472 m_structureID->propertyMap().remove(propertyName, m_propertyStorage); 473 m_structureID->clearEnumerationCache(); 478 474 return; 479 475 } 480 476 481 477 RefPtr<StructureID> structureID = StructureID::toDictionaryTransition(m_structureID); 482 offset = structureID->propertyMap().remove(propertyName); 483 if (offset != WTF::notFound) 484 m_propertyStorage[offset] = jsUndefined(); 478 structureID->propertyMap().remove(propertyName, m_propertyStorage); 485 479 setStructureID(structureID.release()); 486 480 } … … 507 501 void JSObject::allocatePropertyStorage(size_t oldSize, size_t newSize) 508 502 { 509 ASSERT(newSize > oldSize);510 511 503 JSValue** oldPropertStorage = m_propertyStorage; 512 504 m_propertyStorage = new JSValue*[newSize];
Note:
See TracChangeset
for help on using the changeset viewer.