2012/11/24 Allen Wirfs-Brock <al...@wirfs-brock.com> > > I see that [2] call for filtering __proto__ access in Get/Put handlers. > I think that dealing with it in a Get/SetInheritance handler would be a > much more efficient way to hand this extremely rare operation. Rather than > filtering for it on every property access, an handler that cares only needs > to worry about the actual Get/SetInhertiance. >
Hmm, so you're arguing that proxy.__proto__ would be equivalent to Object.getPrototypeOf(proxy), and trigger the "getPrototypeOf" trap, rather than triggering the "get" trap? I guess that more accurately reflects the magical behavior of __proto__. Paradoxically, this will move the filter check into the proxy implementation itself, to properly intercept proxy["__proto__"]. On first sight, this seems to introduce more overhead. Cheers, Tom
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss