archives

« Bugzilla Issues Index

#2568 — 9.5.4 Proxy [[PreventExtensions]] language misses early return check?


9.5.4 steps 8-13 read:

8. Let booleanTrapResult be ToBoolean(trapResult)
9. ReturnIfAbrupt(booleanTrapResult).
10. Let targetIsExtensible be the result of calling the [[IsExtensible]] internal
method of target.
11. ReturnIfAbrupt(targetIsExtensible).
12. If booleanTrapResult is true and targetIsExtensible is true, then throw a
TypeError exception.
13. Return booleanTrapResult.

Is it intentional that the [[IsExtensible]] check is unconditionally called with respect to the return value of the trap? It seems to me you would only want to make the [[IsExtensible]] invocation if |booleanTrapResult| was true, and return false early otherwise.


fixed in rev23 editor's draft


fixed in rev23 draft