mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
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:
parent
7696a6bd20
commit
86f3f37950
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue