public virtual void Delete(string index) { Descriptor d = null; if (TryGetDescriptor(index, out d)) { if (d.Configurable) { properties.Delete(index); m_length--; } else { throw new JintException("Property " + index + " isn't configurable"); } } }
public void Delete(string name) { bag.Delete(name); if (lastAccessed != null && lastAccessed.Name == name) { lastAccessed = null; } }
public void Delete(string index) { Descriptor d = null; if (TryGetDescriptor(index, out d)) { if (d.Configurable) { //d.Delete(); properties.Delete(index); if (length > -1) { length--; } } else { throw new JintException(); } } }
public virtual Descriptor GetDescriptor(string index) { Descriptor result; if (properties.TryGet(index, out result)) { if (!result.isDeleted) { return(result); } else { properties.Delete(index); // remove from cache } } // Prototype always a JsObject, (JsNull.Instance is also an object and next call will return null in case of null) if ((result = Prototype.GetDescriptor(index)) != null) { properties.Put(index, result); // cache descriptior } return(result); }