[+Allen]
2013/3/13 Nathan Wall nathan.w...@live.com
However, as a matter of principle, my argument is that
`Object.getOwnPropertyDescriptor` should, at the bare minimum, return a
descriptor that can be known to work in `Object.defineProperty`. If
`Object.defineProperty` doesn't accept it,
Tom Van Cutsem wrote:
[+Allen]
2013/3/13 Nathan Wall nathan.w...@live.com mailto:nathan.w...@live.com
However, as a matter of principle, my argument is that
`Object.getOwnPropertyDescriptor` should, at the bare minimum,
return a descriptor that can be known to work in
Le 14/03/2013 08:51, Tom Van Cutsem a écrit :
[+Allen]
2013/3/13 Nathan Wall nathan.w...@live.com mailto:nathan.w...@live.com
However, as a matter of principle, my argument is that
`Object.getOwnPropertyDescriptor` should, at the bare minimum,
return a descriptor that can be known
On 3/14/2013 2:12 AM, David Bruant wrote:
Le 14/03/2013 08:51, Tom Van Cutsem a écrit :
[+Allen]
2013/3/13 Nathan Wall nathan.w...@live.com
mailto:nathan.w...@live.com
However, as a matter of principle, my argument is that
`Object.getOwnPropertyDescriptor` should, at the bare
Le 14/03/2013 17:01, Brandon Benvie a écrit :
I also mentioned I thought it was unlikely to be commonly used, since
I've never seen it used besides some of my own code (which exists in a
couple libraries used by few or just me).
Sincere apologies on missing an important part of your quote (I
this is an excellent Point Mark, I wish I mentioned this earlier in
redefine.js
For already panicing developers sake, the problem addressed by Mark can be
easily solved going explicitly over the property definition so that this
won't work:
Object.freeze(Object.prototype);
function Point(x, y) {
Le 12/03/2013 16:45, Tom Van Cutsem a écrit :
Hi Nathan,
2013/3/10 Nathan Wall nathan.w...@live.com mailto:nathan.w...@live.com
Given that `defineProperty` uses properties on the prototype of
the descriptor[1] and `getOwnPropertyDescriptor` returns an object
which inherits from
David Bruant wrote:
Tom Van Cutsem wrote:
To my mind, the blame for the breakage lies with `Object.prototype`
being mutated by the third-party script, not with property descriptors
inheriting from Object.prototype. Thus, a fix for the breakage should
address that directly, rather than
The one qualification everyone should be aware of is that if they simply
freeze these themselves, rather than using the tamper-proofing abstractions
defined by SES[1][2], then they will suffer from the override mistake[3]
and conventional code such as the following will break:
function Point(x,
On Wed, Mar 13, 2013 at 8:26 AM, Nathan Wall nathan.w...@live.com wrote:
David Bruant wrote:
Tom Van Cutsem wrote:
To my mind, the blame for the breakage lies with `Object.prototype`
being mutated by the third-party script, not with property descriptors
inheriting from
Le 13/03/2013 16:26, Nathan Wall a écrit :
David Bruant wrote:
Tom Van Cutsem wrote:
To my mind, the blame for the breakage lies with `Object.prototype`
being mutated by the third-party script, not with property descriptors
inheriting from Object.prototype. Thus, a fix for the breakage should
Le 13/03/2013 16:49, Mark S. Miller a écrit :
On Wed, Mar 13, 2013 at 8:26 AM, Nathan Wall nathan.w...@live.com
mailto:nathan.w...@live.com wrote:
David Bruant wrote:
Tom Van Cutsem wrote:
To my mind, the blame for the breakage lies with
`Object.prototype`
being
Hi Nathan,
2013/3/10 Nathan Wall nathan.w...@live.com
Given that `defineProperty` uses properties on the prototype of the
descriptor[1] and `getOwnPropertyDescriptor` returns an object which
inherits from `Object.prototype`, the following use-case is volatile:
function copy(from, to) {
for safe definition and more, have a look into redefine
https://github.com/WebReflection/redefine#redefinejs
br
On Sat, Mar 9, 2013 at 7:54 PM, Nathan Wall nathan.w...@live.com wrote:
Given that `defineProperty` uses properties on the prototype of the
descriptor[1] and
Yes, this was in this list some three-four months ago. There were
answers like JS is this way dynamic, playing with Object.prototype hurts.
I proposed that return value from Object.getOwnPropertyDescriptor should
inherit from well well-known frozen object with all the default set.
Back, then
there was another discussion here, is not just getOwnPropertyDescriptor
problem:
https://mail.mozilla.org/pipermail/es-discuss/2012-November/026705.html
On Sun, Mar 10, 2013 at 4:37 AM, Herby Vojčík he...@mailbox.sk wrote:
Yes, this was in this list some three-four months ago. There were
(1) Nuke the special properties (`get`, `set`, and `value` when any of them
is not defined) on a descriptor returned by `getOwnPropertyDescriptor` which
shouldn't be inherited through the descriptor's prototype. By nuke them, I
mean specify that they be defined as `undefined`, much like
17 matches
Mail list logo