// In future we may want to cache this property. bool Structure::isSealed(JSGlobalData& globalData) { if (isExtensible()) return false; materializePropertyMapIfNecessary(globalData); if (!m_propertyTable) return true; PropertyTable::iterator end = m_propertyTable->end(); for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter) { if ((iter->attributes & DontDelete) != DontDelete) return false; } return true; }
// In future we may want to cache this property. bool Structure::isFrozen(JSGlobalData& globalData) { if (isExtensible()) return false; materializePropertyMapIfNecessary(globalData); if (!propertyTable()) return true; PropertyTable::iterator end = propertyTable()->end(); for (PropertyTable::iterator iter = propertyTable()->begin(); iter != end; ++iter) { if (!(iter->attributes & DontDelete)) return false; if (!(iter->attributes & (ReadOnly | Accessor))) return false; } return true; }