Ignore:
Timestamp:
Aug 21, 2013, 12:51:20 PM (12 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=120127
Remove JSObject::propertyIsEnumerable

Reviewed by Sam Weinig.

This method is just a wart - it contains unnecessary const-casting, function call overhead, and LOC.

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

(JSC::objectProtoFuncPropertyIsEnumerable):

  • Move implementation here using getOwnPropertyDescriptor directly.
File:
1 edited

Legend:

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

    r154373 r154405  
    14061406    }
    14071407    return false;
    1408 }
    1409 
    1410 bool JSObject::propertyIsEnumerable(ExecState* exec, const Identifier& propertyName) const
    1411 {
    1412     PropertyDescriptor descriptor;
    1413     if (!const_cast<JSObject*>(this)->getOwnPropertyDescriptor(exec, propertyName, descriptor))
    1414         return false;
    1415     return descriptor.enumerable();
    14161408}
    14171409
Note: See TracChangeset for help on using the changeset viewer.