Ignore:
Timestamp:
Aug 26, 2009, 9:52:15 AM (16 years ago)
Author:
[email protected]
Message:

[ES5] Implement getOwnPropertyDescriptor
https://bugs.webkit.org/show_bug.cgi?id=28724

Reviewed by Gavin Barraclough.

JavaScriptCore:
Implement the core runtime support for getOwnPropertyDescriptor.
This adds a virtual getOwnPropertyDescriptor method to every class
that implements getOwnPropertySlot that shadows the behaviour of
getOwnPropertySlot. The alternative would be to make getOwnPropertySlot
(or PropertySlots in general) provide property attribute information,
but quick testing showed this to be a regression.

WebCore:
Implement the WebCore side of getOwnPropertyDescriptor. This
requires a custom implementation of getOwnPropertyDescriptor
for every class with a custom implementation of getOwnPropertySlot.

The bindings generator has been updated to generate appropriate
versions of getOwnPropertyDescriptor for the general case where
a custom getOwnPropertyDescriptor is not needed. ES5 is vague
about how getOwnPropertyDescriptor should work in the context of
"host" functions with polymorphic GetOwnProperty, so it seems
okay that occasionally we "guess" what attributes -- eg. determining
whether a property is writable.

Test: fast/js/getOwnPropertyDescriptor.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r47752 r47780  
    118118__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
    119119__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
     120__ZN3JSC12StringObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
    120121__ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
    121122__ZN3JSC12StringObject4infoE
     
    147148__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF10PassRefPtrINS_9StructureEEERKNS_10IdentifierE
    148149__ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
     150__ZN3JSC16JSVariableObject14symbolTableGetERKNS_10IdentifierERNS_18PropertyDescriptorE
    149151__ZN3JSC16JSVariableObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
    150152__ZN3JSC16toUInt32SlowCaseEdRb
     
    155157__ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
    156158__ZN3JSC18DebuggerActivationC1EPNS_8JSObjectE
     159__ZN3JSC18PropertyDescriptor12setUndefinedEv
     160__ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj
     161__ZN3JSC18PropertyDescriptor21setAccessorDescriptorENS_7JSValueES1_j
     162__ZNK3JSC18PropertyDescriptor6setterEv
     163__ZNK3JSC18PropertyDescriptor6getterEv
    157164__ZN3JSC19constructEmptyArrayEPNS_9ExecStateE
    158165__ZN3JSC19initializeThreadingEv
     
    245252__ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
    246253__ZN3JSC8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE
     254__ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
    247255__ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_7JSValueE 
    248256__ZN3JSC8JSObject23allocatePropertyStorageEmm
     257__ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
    249258__ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
    250259__ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_7JSValueE 
     
    338347__ZNK3JSC17DebuggerCallFrame4typeEv
    339348__ZNK3JSC17DebuggerCallFrame8evaluateERKNS_7UStringERNS_7JSValueE
     349__ZNK3JSC18PropertyDescriptor12hasAccessorsEv
    340350__ZNK3JSC4Heap10statisticsEv
    341351__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
Note: See TracChangeset for help on using the changeset viewer.