GeezerVison is showing github.com — funky behavior inside Proxy handler function · Issue #6464 · nodejs/node
funky behavior inside Proxy handler function #6464Labels confirmed-bugIssues and PRs for confirmed bugs.utilIssues and PRs related to the built-in util module. Description
- Version: 6.0.0
- Platform: darwin
- Subsystem: 10.11

Activityrusintez commented on Apr 29, 2016 jasnell commented on Apr 29, 2016 Confirmed, it seems that util.inspect doesn't know what to make of Proxy objects in certain cases... will look into it. jasnell commented on Apr 29, 2016 The issue here is that the firstthird argument passed to get is the proxy object itself. This is passed to console.log() which does a util.inspect(). Now, util.inspect() attempts to walk the properties for the Proxy object, which ends up recursively calling get... which leads to the max call stack error. rusintez commented on Apr 29, 2016 rusintez commented on Apr 29, 2016 Any ideas about arguments[2] in the last screenshot? jasnell commented on Apr 29, 2016 Yes, I just realized in my comment above I mentioned the wrong argument... the third argument passed to get is the proxy object. Look here .. the get argument is passed three arguments, the target, the property name and the proxy. its2mc commented on May 2, 2016 Hey.. I modified the function a bit and got a random output that I do not fully understand..
var a = new Proxy({}, {get:(arg)=>(console.log(arg),5)});
The output is
 its2mc commented on May 2, 2016 Is it recursive because the object itself is the argument? , is this a loop structure? I mean is the arrow function recursive.
MetadataMetadataconfirmed-bugIssues and PRs for confirmed bugs.utilIssues and PRs related to the built-in util module. DevelopmentNo branches or pull requestsIssue actions
|