/// <summary> /// Initializes the prototype properties. /// </summary> /// <param name="obj"> The object to set the properties on. </param> /// <param name="constructor"> A reference to the constructor that owns the prototype. </param> internal static void InitializePrototypeProperties(ObjectInstance obj, FunctionConstructor constructor) { var engine = obj.Engine; var properties = GetDeclarativeProperties(engine); properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable)); properties.Add(new PropertyNameAndValue("name", "Empty", PropertyAttributes.Configurable)); properties.Add(new PropertyNameAndValue("length", 0, PropertyAttributes.Configurable)); obj.FastSetProperties(properties); }