Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: fix inspecting of proxy objects #6465

Closed
wants to merge 6 commits into from

Commits on Apr 29, 2016

  1. util: fix inspecting of proxy objects

    In certain conditions, inspecting a Proxy object can lead to a
    max call stack error. Avoid that by detecting the Proxy object
    and outputting information about the Proxy object itself.
    
    Also adds util.isProxy()
    
    Fixes: nodejs#6464
    jasnell committed Apr 29, 2016
    Configuration menu
    Copy the full SHA
    86daa71 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2016

  1. Address nits

    jasnell committed Apr 30, 2016
    Configuration menu
    Copy the full SHA
    ec16e91 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2ebb7b View commit details
    Browse the repository at this point in the history
  3. Reworked based on @bnoordhuis' feedback

    Just eliminated the isProxy call entirely, just try to get the
    proxy details and if it returns undefined, we know. Still have
    to cache the results either way to avoid duplicate lookup later.
    Simplified the native side to return an array as suggested.
    Expanded the test cases a bit more.
    
    It's still dog slow so the showProxy option has to be enabled
    for it to walk the path.
    
    Also, since apparently functions can also be proxied, check for
    that too.
    jasnell committed Apr 30, 2016
    Configuration menu
    Copy the full SHA
    f630602 View commit details
    Browse the repository at this point in the history
  4. Fix doc nit

    jasnell committed Apr 30, 2016
    Configuration menu
    Copy the full SHA
    6115df5 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2016

  1. Address nits

    jasnell committed May 1, 2016
    Configuration menu
    Copy the full SHA
    842a8e4 View commit details
    Browse the repository at this point in the history