[js] Get the class pointer from the ObjectGroup...

master
Fedor 2020-07-16 03:57:14 +03:00
parent 8ff611b3e7
commit e9004db372
1 changed files with 4 additions and 1 deletions

View File

@ -646,7 +646,10 @@ class NativeObject : public ShapedObject
uint32_t slotSpan() const {
if (inDictionaryMode())
return lastProperty()->base()->slotSpan();
return lastProperty()->slotSpan();
// Get the class from the object group rather than the base shape to avoid a
// race between Shape::ensureOwnBaseShape and background sweeping.
return lastProperty()->slotSpan(getClass());
}
/* Whether a slot is at a fixed offset from this object. */