diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/PropertyMapHashTable.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/PropertyMapHashTable.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h index 9c6ddb20f..2d0f27a3e 100644 --- a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h +++ b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h @@ -178,7 +178,7 @@ public: PropertyOffset getDeletedOffset(); void addDeletedOffset(PropertyOffset); - PropertyOffset nextOffset(PropertyOffset inlineCapacity); + PropertyOffset nextOffset(JSType); // Copy this PropertyTable, ensuring the copy has at least the capacity provided. PassOwnPtr<PropertyTable> copy(JSGlobalData&, JSCell* owner, unsigned newCapacity); @@ -486,12 +486,15 @@ inline void PropertyTable::addDeletedOffset(PropertyOffset offset) m_deletedOffsets->append(offset); } -inline PropertyOffset PropertyTable::nextOffset(PropertyOffset inlineCapacity) +inline PropertyOffset PropertyTable::nextOffset(JSType type) { if (hasDeletedOffset()) return getDeletedOffset(); - - return propertyOffsetFor(size(), inlineCapacity); + + if (type == FinalObjectType) + return size(); + + return size() + firstOutOfLineOffset; } inline PassOwnPtr<PropertyTable> PropertyTable::copy(JSGlobalData& globalData, JSCell* owner, unsigned newCapacity) |