Re: Feedback on the [[HasProperty]] refactoring

2012-09-19 Thread Tom Van Cutsem
For the record, I updated the [[HasProperty]] algorithm on the wiki to call [[HasOwnProperty]] instead of [[GetOwnProperty]], as suggested. 2012/9/17 Tom Van Cutsem tomvc...@gmail.com Hi David, In the ES5 world, [[HasOwnProperty]] or [[GetOwnProperty]]+check if prop !== undefined is

compatible descriptors and how they are checked

2012-09-19 Thread David Bruant
Hi, In the current state of the strawman [1], one security invariants for getOwnPropertyDescriptor is: 
if property exists on target, check if the returned descriptor is compatible. I just wish to say on the list that it means that the following case throws: var p = new Proxy({a:1}, {

Re: compatible descriptors and how they are checked

2012-09-19 Thread Tom Van Cutsem
Hi David, I think you caught a spec bug, because your example should indeed throw, yet it currently doesn't (neither in my harmony-reflect shim nor in Firefox nightly). The code doesn't throw because the relevant checks for getOwnPropertyDescriptor are currently: 1) is the returned descriptor d

Re: compatible descriptors and how they are checked

2012-09-19 Thread Jason Orendorff
On Wed, Sep 19, 2012 at 4:44 AM, David Bruant bruan...@gmail.com wrote: Also, the wiki doesn't say how the check is being performed. http://wiki.ecmascript.org/doku.php?id=harmony:proxies_spec TrapGetOwnProperty specifies how the check is performed. -j

Re: compatible descriptors and how they are checked

2012-09-19 Thread David Bruant
Le 19/09/2012 13:48, Jason Orendorff a écrit : On Wed, Sep 19, 2012 at 4:44 AM, David Bruant bruan...@gmail.com wrote: Also, the wiki doesn't say how the check is being performed. http://wiki.ecmascript.org/doku.php?id=harmony:proxies_spec TrapGetOwnProperty specifies how the check is

Re: compatible descriptors and how they are checked

2012-09-19 Thread Tom Van Cutsem
2012/9/19 David Bruant bruan...@gmail.com Once again, just to state how things are, all algorithms in the harmony:proxies_spec page will have the largest part of their internal revealed if either the target or the handler are themselves proxies. It may necessitate a careful review of each

Re: Object.observe and observing computed properties

2012-09-19 Thread Steve Sanderson
Following this discussion, Rafael and I talked about various strategies that an MV* library could use to detect dependencies from arbitrary expressions and code blocks, as would be needed to achieve the kinds of niceties present in Knockout.js/Batman.js etc. Some of these tie in with

Re: Object.observe and observing computed properties

2012-09-19 Thread Brendan Eich
From A, B and C as alternatives, especially A and C, it seems you want synchronous read intercession, but are happy with Object.observe's asynchronous write intercession? If so, then the plan interference objection is fatal. If not, then how would async read intercession work? Callbacks and

Re: Object.observe and observing computed properties

2012-09-19 Thread Rafael Weinstein
[Sorry, this time from the right email] Object.deliverChangeRecords allows A to be a strategy in the possible future that Steve describes (if reads were to generate changeRecords) [Just to be clear: I *don't* think it makes sense to include reads in the set of changeRecords generated by