Always implement getOwnEnumerablePropertyKeys

According to JSProxy.h, without this the default implementation calls
ownPropertyKeys and filters out the unenumerable properties. We know when such
things exist so we don't need to do that.
This commit is contained in:
Anthony Ramine 2015-12-25 05:04:00 +01:00
parent 7696a6bd20
commit 86f3f37950

View file

@ -2602,9 +2602,9 @@ class CGDefineProxyHandler(CGAbstractMethod):
if self.descriptor.operations['NamedDeleter']:
customDelete = 'delete'
getOwnEnumerablePropertyKeys = "None"
getOwnEnumerablePropertyKeys = "own_property_keys"
if self.descriptor.interface.getExtendedAttribute("LegacyUnenumerableNamedProperties"):
getOwnEnumerablePropertyKeys = "Some(getOwnEnumerablePropertyKeys)"
getOwnEnumerablePropertyKeys = "getOwnEnumerablePropertyKeys"
args = {
"defineProperty": customDefineProperty,
@ -2631,7 +2631,7 @@ let traps = ProxyTraps {
construct: None,
getPropertyDescriptor: Some(get_property_descriptor),
hasOwn: Some(hasOwn),
getOwnEnumerablePropertyKeys: %(getOwnEnumerablePropertyKeys)s,
getOwnEnumerablePropertyKeys: Some(%(getOwnEnumerablePropertyKeys)s),
nativeCall: None,
hasInstance: None,
objectClassIs: None,