Skip to content

funky behavior inside Proxy handler function #6464

Description

@rusintez
  • Version: 6.0.0
  • Platform: darwin
  • Subsystem: 10.11

screen shot 2016-04-29 at 14 53 46

Activity

  1. rusintez commented on Apr 29, 2016

    @rusintez
    Author

    screen shot 2016-04-29 at 15 00 55

  2. added
    confirmed-bugIssues and PRs for confirmed bugs.
    utilIssues and PRs related to the built-in util module.
    on Apr 29, 2016
  3. jasnell commented on Apr 29, 2016

    @jasnell
    Member

    Confirmed, it seems that util.inspect doesn't know what to make of Proxy objects in certain cases... will look into it.

  4. jasnell commented on Apr 29, 2016

    @jasnell
    Member

    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.

  5. rusintez commented on Apr 29, 2016

    @rusintez
    Author

    👍

  6. rusintez commented on Apr 29, 2016

    @rusintez
    Author

    Any ideas about arguments[2] in the last screenshot?

  7. jasnell commented on Apr 29, 2016

    @jasnell
    Member

    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.

  8. its2mc commented on May 2, 2016

    @its2mc

    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
    image

  9. its2mc commented on May 2, 2016

    @its2mc

    Is it recursive because the object itself is the argument? , is this a loop structure? I mean is the arrow function recursive.

  10. added a commit that references this issue on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions