W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

Re: Violations of internal method invariants?

From: Jason Orendorff <jason.orendorff@gmail.com>
Date: Thu, 31 Jul 2014 08:26:22 -0500
Message-ID: <CAPh8+ZqGEJumsuaXP-WhNZ+6wrsWmXEhpAkfzFfV4tjeVaeQEg@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Tom Van Cutsem <tomvc.be@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
On Thu, Jul 31, 2014 at 1:23 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> And the Web IDL spec has yet another approach to this whole thing: It simply
> coerces "configurable" to true in its custom [[DefineOwnProperty]] for these
> sorts of objects (but keeps effectively separate namespaces).

Interesting. This approach doesn't seem quite kosher.

ES6 lists some invariants here that apply to all objects, even host objects:
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-invariants-of-the-essential-internal-methods

There's not a rule that says flat-out, "If Desc.[[Configurable]] is
false and [[DefineOwnProperty]](P, Desc) returns true, that counts as
'observing' the property P as a non-configurable property on the
target." but if you take that as read, what WebIDL is doing here is
banned.

Note that steps 14-22 of 9.5.6 (Proxy#[[DefineOwnProperty]]) do some
checks which enforce this rule.
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc

Tom, can the prose be improved? What's the intent?

-j
Received on Thursday, 31 July 2014 13:26:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC