archives

« Bugzilla Issues Index

#2211 — Proxy abstract operations: some check if [[ProxyHandler]] is null, some if undefined


Abstract operations defined under section "9.5 Proxy Object Internal Methods and Internal Slots" have initial steps that throw an exception when the [[ProxyHandler]] has an invalid value (it's done during the first 2 or 3 steps of each algorithm).

The 'invalid value' is inconsistent throughout the abstract operations. This looks like a mistake.

The following compare [[ProxyHandler]] to null:
[[GetPrototypeOf]]
[[SetPrototypeOf]]
[[IsExtensible]]
[[GetOwnProperty]]
[[DefineOwnProperty]]
[[HasProperty]]
[[Get]]
[[Delete]]
[[Enumerate]]
[[Construct]]

The following compare [[ProxyHandler] to undefined:
[[PreventExtensions]]
[[Set]]
[[OwnPropertyKeys]]
[[Call]]

Note that [[Get]] and [[Set]] perform different checks.

It looks like all checks should be against null.

This issue was found in the ES6 specs draft of November 8, 2013
( http://wiki.ecmascript.org/lib/exe/fetch.php?id=harmony%3Aspecification_drafts&cache=cache&media=harmony:working_draft_ecma-262_edition_6_11-08-13.pdf )

I could not pick this version from the version list while filling this bug.


fixed in rev22 editor's draft


fixed in Rev22 (January 20, 2013) release