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 util.inspect with proxied function #25244

Closed
wants to merge 1 commit into from

Conversation

@starkwang
Copy link
Contributor

commented Dec 28, 2018

Fixes: #25212

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
@BridgeAR

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

It does not hurt to do this but it will not solve the overall issue with proxies: they are difficult to reason with and even more difficult to write in a way that does not interfere with things.

We trigger multiple traps while inspecting an object and we can not work around all of the issues that might potentially come up.

Another example that would fail is using an empty array instead of the function.

@bnoordhuis
Copy link
Member

left a comment

LGTM. I agree with Ruben's comment but this PR is still an improvement over the status quo so why not?

@starkwang

This comment has been minimized.

Copy link
Contributor Author

commented Dec 28, 2018

We trigger multiple traps while inspecting an object and we can not work around all of the issues that might potentially come up.

@BridgeAR Agreed. We can not fix all these issues. For example, an array with a weird proxy is hard to fix.

But at least we can make it a little better :-)

@starkwang

This comment has been minimized.

Copy link
Contributor Author

commented Dec 29, 2018

@addaleax

This comment has been minimized.

Copy link
Member

commented Dec 30, 2018

@addaleax

This comment has been minimized.

Copy link
Member

commented Dec 31, 2018

Landed in 6c7c77e

@addaleax addaleax closed this Dec 31, 2018

addaleax added a commit that referenced this pull request Dec 31, 2018
util: fix util.inspect with proxied function
PR-URL: #25244
Fixes: #25212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
targos added a commit that referenced this pull request Jan 1, 2019
util: fix util.inspect with proxied function
PR-URL: #25244
Fixes: #25212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
refack added a commit to refack/node that referenced this pull request Jan 14, 2019
util: fix util.inspect with proxied function
PR-URL: nodejs#25244
Fixes: nodejs#25212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
BethGriggs added a commit that referenced this pull request Apr 28, 2019
util: fix util.inspect with proxied function
PR-URL: #25244
Fixes: #25212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
BethGriggs added a commit that referenced this pull request May 10, 2019
util: fix util.inspect with proxied function
PR-URL: #25244
Fixes: #25212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
MylesBorins added a commit that referenced this pull request May 16, 2019
util: fix util.inspect with proxied function
PR-URL: #25244
Fixes: #25212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.