Proxies and proto; cyclic now possible

Boris Zbarsky bzbarsky at
Mon Dec 8 18:08:18 PST 2014

On 12/8/14, 6:24 PM, 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 "" 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.

The console may be trying to show the resulting object, yes.

I filed to track this.

> Great, that's what I was thinking about. I shared the same concern as Allen about involuntary while loop of prototype cascade that would never return to the user code and would never stop at all. But if UA are aware of the situation and took action, that should be fine I agree. I just wanted to be sure it's the case. It seems Firefox's console didn't get the message but Firefox itself seems to handle this fine.

Not quite, see bug report.


More information about the es-discuss mailing list