Skip to content

Commit

Permalink
Check ignoreNamedProps before the named property visibility algorithm.
Browse files Browse the repository at this point in the history
Running the named property visibility algorithm is (or should be) observable
by inserting a proxy in the prototype chain. This changes the spec to match
Gecko's behavior.
  • Loading branch information
Ms2ger committed Jan 31, 2019
1 parent 81dc040 commit a9673c8
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions index.bs
Expand Up @@ -12741,30 +12741,31 @@ internal method as follows.
1. Set |desc|.\[[Enumerable]] and |desc|.\[[Configurable]] to <emu-val>true</emu-val>.
1. Return |desc|.
1. Set |ignoreNamedProps| to true.
1. If |O| [=support named properties|supports named properties=],
the result of running the [=named property visibility algorithm=] with
property name |P| and object |O| is true, and |ignoreNamedProps| is false, then:
1. Let |operation| be the operation used to declare the named property getter.
1. Let |value| be an uninitialized variable.
1. If |operation| was defined without an [=identifier=], then
set |value| to the result of performing the steps listed in the interface description to
[=determine the value of a named property=]
with |P| as the name.
1. Otherwise, |operation| was defined with an identifier. Set |value| to the result
of performing the steps listed in the description of |operation| with |P| as the only argument value.
1. Let |desc| be a newly created [=Property Descriptor=] with no fields.
1. Set |desc|.\[[Value]] to the result of [=converted to an ECMAScript value|converting=]
|value| to an ECMAScript value.
1. If |O| implements an interface with a [=named property setter=], then set
|desc|.\[[Writable]] to <emu-val>true</emu-val>, otherwise set it to
<emu-val>false</emu-val>.
1. If |O| implements an interface with the
[{{LegacyUnenumerableNamedProperties}}]
[=extended attribute=],
then set |desc|.\[[Enumerable]] to <emu-val>false</emu-val>,
otherwise set it to <emu-val>true</emu-val>.
1. Set |desc|.\[[Configurable]] to <emu-val>true</emu-val>.
1. Return |desc|.
1. If |O| [=support named properties|supports named properties=] and
|ignoreNamedProps| is false, then:
1. If the result of running the [=named property visibility algorithm=] with
property name |P| and object |O| is true, then:
1. Let |operation| be the operation used to declare the named property getter.
1. Let |value| be an uninitialized variable.
1. If |operation| was defined without an [=identifier=], then
set |value| to the result of performing the steps listed in the interface description to
[=determine the value of a named property=]
with |P| as the name.
1. Otherwise, |operation| was defined with an identifier. Set |value| to the result
of performing the steps listed in the description of |operation| with |P| as the only argument value.
1. Let |desc| be a newly created [=Property Descriptor=] with no fields.
1. Set |desc|.\[[Value]] to the result of [=converted to an ECMAScript value|converting=]
|value| to an ECMAScript value.
1. If |O| implements an interface with a [=named property setter=], then set
|desc|.\[[Writable]] to <emu-val>true</emu-val>, otherwise set it to
<emu-val>false</emu-val>.
1. If |O| implements an interface with the
[{{LegacyUnenumerableNamedProperties}}]
[=extended attribute=],
then set |desc|.\[[Enumerable]] to <emu-val>false</emu-val>,
otherwise set it to <emu-val>true</emu-val>.
1. Set |desc|.\[[Configurable]] to <emu-val>true</emu-val>.
1. Return |desc|.
1. Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|).
</div>

Expand Down

0 comments on commit a9673c8

Please sign in to comment.