Re: Help wanted: Membrane proxies + Object.freeze() == paradox

2017-05-23 Thread Alex Vincent
Thanks, Jason. I tried that approach last night (calling setPrototypeOf within the getPrototypeOf trap), and it caused a nasty regression in one of my other prototype-checking tests. I assumed at the time that I had done something wrong, but your quick summary shows that instead I was doing

Re: Help wanted: Membrane proxies + Object.freeze() == paradox

2017-05-23 Thread Jason Orendorff
I think the most straightforward thing is something like this: https://gist.github.com/jorendorff/85d74ef7dce0118664535f84d57d6788 To restate the obvious, this is a minimal fix for your minimized test case, not production code you can take and use. You'd need to implement all the rest of the

Re: Help wanted: Membrane proxies + Object.freeze() == paradox

2017-05-23 Thread Alex Vincent
Yes, I've been using the shadow technique in my es7-membrane project for quite some time. I was trying to minimize a fairly complex test case here. Obviously, I can reintroduce shadow targets into the minimal testcase, but then I need to figure out how to make the prototype object I'm trying to

Re: Help wanted: Membrane proxies + Object.freeze() == paradox

2017-05-23 Thread Mark S. Miller
Take a look at Tom's explanation of the "shadow target" technique at https://research.google.com/pubs/pub40736.html section 4.3 On Tue, May 23, 2017 at 8:45 AM, Jason Orendorff wrote: > On Tue, May 23, 2017 at 2:44 AM, Alex Vincent wrote: > >>

Re: Help wanted: Membrane proxies + Object.freeze() == paradox

2017-05-23 Thread Jason Orendorff
On Tue, May 23, 2017 at 2:44 AM, Alex Vincent wrote: > Full details are at https://github.com/ajvincent/es7-membrane/issues/79 , > which is where I'm hoping to find a solution. > To fix this, you must create a third object for each dry proxy, to serve as its

Re: Help wanted: Membrane proxies + Object.freeze() == paradox

2017-05-23 Thread Boris Zbarsky
On 5/23/17 3:44 AM, Alex Vincent wrote: 3. I create matching "membrane" proxies for wetB and wet_b named dryB and dry_b, Shouldn't you also have a proxy for webB.prototype (called dryproto, let's say)? Otherwise your "wet" and "dry" object graphs are actually a single kind of weird

Help wanted: Membrane proxies + Object.freeze() == paradox

2017-05-23 Thread Alex Vincent
Full details are at https://github.com/ajvincent/es7-membrane/issues/79 , which is where I'm hoping to find a solution. In short: if 1. I have a function wetB() and an instance of wetB called wet_b, 2. I call Object.freeze(wet_b); 3. I create matching "membrane" proxies for wetB and