9.1.2 [[SetPrototypeOf]] (V)
till at tillschneidereit.net
Mon Jun 30 01:47:47 PDT 2014
On Mon, Jun 30, 2014 at 10:18 AM, raul mihaila <raul.mihaila at gmail.com>
> While reading the SetPrototypeOf algorithm I noticed that some steps are
> repeated. At step 5, if O.[[Extensible]] is false, the method returns
> false. But at step 8, the same condition is checked again. It seems to me
> that between these steps neither the value of O, nor the value of
> O.[[Extensible]] changes. Aren't steps 7 and 8 redundant?
The second set of checks is needed because step 6 might change the results:
if one of the objects iterated over in step 6 is a proxy, then arbitrary
code can be executed through an invocation of its `getPrototypeOf` handler.
This code might make O inextensible or change its __proto__ to be the same
value as V.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss