Ignore:
Timestamp:
Aug 20, 2013, 10:12:33 AM (12 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=120067
Remove getPropertyDescriptor

Reviewed by Oliver Hunt.

This is used by lookupGetter/lookupSetter - this can easily bee replaced by getPropertySlot.
Since we'll be getting the GetterSetter from the slot in the setter case, rename isGetter() to isAccessor().

  • runtime/JSObject.cpp:
  • runtime/JSObject.h:
    • remove getPropertyDescriptor
  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):

  • replace call to getPropertyDescriptor with getPropertySlot
  • runtime/PropertyDescriptor.h:
  • runtime/PropertySlot.h:

(JSC::PropertySlot::isAccessor):
(JSC::PropertySlot::isCacheableGetter):
(JSC::PropertySlot::getterSetter):

  • rename isGetter() to isAccessor()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r154300 r154337  
    23842384GET_OWN_PROPERTY_DESCRIPTOR_IMPL(JSObject)
    23852385
    2386 bool JSObject::getPropertyDescriptor(ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
    2387 {
    2388     JSObject* object = this;
    2389     while (true) {
    2390         if (object->methodTable()->getOwnPropertyDescriptor(object, exec, propertyName, descriptor))
    2391             return true;
    2392         JSValue prototype = object->prototype();
    2393         if (!prototype.isObject())
    2394             return false;
    2395         object = asObject(prototype);
    2396     }
    2397 }
    2398 
    23992386static bool putDescriptor(ExecState* exec, JSObject* target, PropertyName propertyName, PropertyDescriptor& descriptor, unsigned attributes, const PropertyDescriptor& oldDescriptor)
    24002387{
Note: See TracChangeset for help on using the changeset viewer.