- From: Boris Zbarsky <notifications@github.com>
- Date: Tue, 18 Dec 2018 05:40:10 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/pull/601/review/186070517@github.com>
bzbarsky requested changes on this pull request. > @@ -12636,7 +12635,7 @@ internal method as follows. The algorithm operates as follows, with property name |P| and object |O|: 1. If |P| is not a [=supported property name=] of |O|, then return false. - 1. If |O| has an own property named |P|, then return false. + 1. If <a abstract-op>HasOwnProperty</a>(|O|, |P|) is <emu-val>true</emu-val>, then return false. Unfortunately, I think this is an infinite recursion. Consider a call to [[GetOwnProperty]] as defined in <https://heycam.github.io/webidl/#legacy-platform-object-getownproperty>. This calls https://heycam.github.io/webidl/#LegacyPlatformObjectGetOwnProperty which calls into https://heycam.github.io/webidl/#dfn-named-property-visibility for _O_. The proposed change would then call https://tc39.github.io/ecma262/#sec-hasownproperty on _O_, which will call right back into _O_'s [[GetOwnProperty]]. What you probably need to do instead is invoke https://tc39.github.io/ecma262/#sec-ordinarygetownproperty directly or something. But note that this uses exactly the same vague "has an own property" (or rather "does not have an own property") language that webidl already has... > @@ -12647,7 +12646,8 @@ internal method as follows. 1. Let |prototype| be |O|.\[[GetPrototypeOf]](). 1. While |prototype| is not null: 1. If |prototype| is not a [=named properties object=], - and |prototype| has an own property named |P|, then return false. + and <a abstract-op>HasOwnProperty</a>(|prototype|, |P|) is <emu-val>true</emu-val>, Is the potentially-observable change here what happens when there's a proxy on the proto chain? What do browsers currently do here? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/601#pullrequestreview-186070517
Received on Tuesday, 18 December 2018 13:40:32 UTC