Proxies and proto; cyclic now possible

Brendan Eich brendan at mozilla.org
Mon Dec 8 15:58:17 PST 2014


François REMY wrote:
> ±>      var o = {};
> ±>      var p = new Proxy(o, { get: function(o, p) { return o[p]; } });
> ±>      o.__proto__ = p;
> ±
> ± This does nothing on its own in Firefox, afaict.
> ± If I then do "o.foo" I get a "too much recursion" exception, as expected.
> ±
> ± What is the problem, exactly?
>
> I typed the line one by one in the console, that's why. There must be something wrong with the console, then.

Please file a bug.

When I originated __proto__ in SpiderMonkey in the '90s, I added cycle 
detection. It was prompt.

/be


More information about the es-discuss mailing list