Changeset 11447 in webkit for trunk/JavaScriptCore/kjs/object.h


Ignore:
Timestamp:
Dec 4, 2005, 3:28:56 PM (19 years ago)
Author:
andersca
Message:

2005-12-04 Anders Carlsson <[email protected]>

Reviewed by Geoffrey.

  • kjs/object.cpp: (KJS::ObjectImp::canPut): Refactor to use getPropertyAttributes.

(KJS::ObjectImp::propertyIsEnumerable):
New function which checks if a property is enumerable.

(KJS::ObjectImp::getPropertyAttributes):

  • kjs/object.h: Add getPropertyAttributes and propertyIsEnumerable.
  • kjs/object_object.cpp: (ObjectPrototypeImp::ObjectPrototypeImp): (ObjectProtoFuncImp::callAsFunction):
  • kjs/object_object.h: (KJS::ObjectProtoFuncImp::): Add propertyIsEnumerable to the Object prototype.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/object.h

    r11296 r11447  
    247247
    248248    /**
     249     * Checks if a property is enumerable, that is if it doesn't have the DontEnum
     250     * flag set
     251     *
     252     * See ECMA 15.2.4
     253     * @param exec The current execution state
     254     * @param propertyName The name of the property
     255     * @return true if the property is enumerable, otherwise false
     256     */
     257    bool propertyIsEnumerable(ExecState *exec, const Identifier &propertyName) const;
     258
     259    /**
    249260     * Checks to see whether the object (or any object in it's prototype chain)
    250261     * has a property with the specified name.
     
    455466    ObjectImp *toObject(ExecState *exec) const;
    456467
     468    bool getPropertyAttributes(const Identifier& propertyName, int& attributes) const;
     469   
    457470    // This get function only looks at the property map.
    458471    // This is used e.g. by lookupOrCreateFunction (to cache a function, we don't want
Note: See TracChangeset for help on using the changeset viewer.