archives

« Bugzilla Issues Index

#3586 — 7.3.15 TestIntegrityLevel (O, level):, step 11: Should one examine all keys even if the result is known?


7.3.15 TestIntegrityLevel (O, level)
Step 11.

When, after examining a property descriptor for some key of the object, it can be determined that the algorithm will return either false (at step 12 or 13) or an abrupt completion (after calling [[GetOwnProperty]] for one of the remaining keys), should the remaining keys be considered at all?

The current draft says "yes". Current Firefox implementation of proxies says "no".

If yes, a NOTE should be added:

NOTE. If the object is not extensible, all its keys are examined, even if the result may be inferred as false after examining only some of its keys.

If no, steps 12 and 13 should be moved inside the loop, as steps 11.d and 11.e.

(Personally, I'm leaning towards "no".)


In case of "no", the algorithm can be simplified by removing the metavariables `configurable` and `writable`:

11. c. If currentDesc is not undefined, then
i. If currentDesc.[[Configurable]] is true, return false.
ii. If level is "frozen", IsDataDescriptor(currentDesc) is true, and currentDesc.[[writable]] is true, return false.


fixed in rev32 editor's dradft

and the answer is no


fixed in rev32 draft