Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

official works - node-proxy does not #33

Open
aikar opened this issue Oct 22, 2013 · 2 comments
Open

official works - node-proxy does not #33

aikar opened this issue Oct 22, 2013 · 2 comments

Comments

@aikar
Copy link

aikar commented Oct 22, 2013

I found this code for handling a general catch all on the global namespace, and it works with node --harmony, but does not with node-proxy

https://gist.github.com/aikar/7094530

TypeError: SetNamedProperty intercepted by non-Proxy object

@samshull
Copy link
Owner

If you would like to see this particular code working, you are going to need to do some more debugging and post it here. Which object is emitting the TypeError? What is the call stack? Does this code get the prototype of the proto object? I don't have the time to debug this one particular use case, but would be happy to help figure out a fix if I can.

@aikar
Copy link
Author

aikar commented Oct 22, 2013

It's essentially installing a trap on the global object.

Even the code you supply in the example folder also does not work for binding to global.

simply doing global.proto = namespace('foo'); will cause it.

I'm just going to run my app under --harmony, I don't really have the time to debug this myself, haven't touched C++ in like 3-5 years now.

but I figured it being in a fragile state and not working the same as official implementation is a note worthy bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants