Ignore:
Timestamp:
Dec 10, 2009, 4:06:15 PM (15 years ago)
Author:
[email protected]
Message:

2009-12-10 Kent Hansen <[email protected]>

Reviewed by Geoffrey Garen.

Remove JSObject::getPropertyAttributes() and all usage of it.
https://bugs.webkit.org/show_bug.cgi?id=31933

getOwnPropertyDescriptor() should be used instead.

  • JavaScriptCore.exp:
  • JavaScriptCore.order:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • debugger/DebuggerActivation.cpp: (JSC::DebuggerActivation::getOwnPropertyDescriptor):
  • debugger/DebuggerActivation.h:
  • runtime/JSObject.cpp: (JSC::JSObject::propertyIsEnumerable):
  • runtime/JSObject.h:
  • runtime/JSVariableObject.cpp:
  • runtime/JSVariableObject.h:

2009-12-10 Kent Hansen <[email protected]>

Reviewed by Geoffrey Garen.

Remove getPropertyAttributes() from JavaScript bindings.
https://bugs.webkit.org/show_bug.cgi?id=31933

The functionality is provided by getOwnPropertyDescriptor().

  • WebCore.order:
  • bindings/js/JSDOMWindowCustom.cpp:
  • bindings/js/JSDOMWindowShell.cpp:
  • bindings/js/JSDOMWindowShell.h:
  • bindings/scripts/CodeGeneratorJS.pm:
  • page/DOMWindow.idl:
File:
1 edited

Legend:

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

    r51801 r51971  
    407407bool JSObject::propertyIsEnumerable(ExecState* exec, const Identifier& propertyName) const
    408408{
    409     unsigned attributes;
    410     if (!getPropertyAttributes(exec, propertyName, attributes))
     409    PropertyDescriptor descriptor;
     410    if (!const_cast<JSObject*>(this)->getOwnPropertyDescriptor(exec, propertyName, descriptor))
    411411        return false;
    412     return !(attributes & DontEnum);
    413 }
    414 
    415 bool JSObject::getPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const
    416 {
    417     JSCell* specificValue;
    418     if (m_structure->get(propertyName, attributes, specificValue) != WTF::notFound)
    419         return true;
    420    
    421     // Look in the static hashtable of properties
    422     const HashEntry* entry = findPropertyHashEntry(exec, propertyName);
    423     if (entry) {
    424         attributes = entry->attributes();
    425         return true;
    426     }
    427    
    428     return false;
     412    return descriptor.enumerable();
    429413}
    430414
Note: See TracChangeset for help on using the changeset viewer.