archives

« Bugzilla Issues Index

#4125 — 9.4.5.3 [[DefineOwnProperty]]: wrong return


In 9.4.5.3, [[DefineOwnProperty]] for integer-indexed objects, step 3.c.xi.3 should be "return status", not "ReturnIfAbrupt(status)", otherwise a reject in IntegerIndexedElementSet in the previous step will be silently swallowed. (Alternatively, tail-call IntegerIndexedElementSet, as in [[Set]].)


Step 3.c.xi.3 never returns `false` (array bounds are checked in 9.4.5.3 steps 3.c.i, 3.c.iii, 3.c.iv, 3.c.vi).


Maybe it's possible to remove steps 3.c.i, 3.c.iii, 3.c.iv, 3.c.vi and rely on IntegerIndexedElementSet to perform the bounds checks. This will lead to a different behaviour for detached buffers, but I don't think that's a problem.


(Note that this bug was raised today against rev 34, when the current Version is rev 35. It might have a better chance of being seen if you bump the Version.)


fixed in rev36 editor's draft

The tail call solution was easiest fix as I think we want to the return false behavior when the buffer is detached.

In practice, an implementation is going to want to inline IntegerIndexedElementSet here and eliminate all the redundant checks.


in rev36