GeezerVison is showing github.com — util: fix inspecting document.all by devsnek · Pull Request #31938 · nodejs/node
Conversation
devsnek
commented
Feb 24, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Checklist
-
make -j4 test (UNIX), or vcbuild test (Windows) passes
- tests and/or benchmarks are included
- documentation is changed or added
- commit message follows commit guidelines
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
bricss reacted with thumbs up emoji
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s nice that we have an V8 API for this, but I’d really like to avoid the performance hit of the extra calls into C++ and would strongly prefer the variant you suggested in #31889 (comment)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
BridgeAR and ExE-Boss reacted with thumbs up emoji
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
BridgeAR
left a comment
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to mark this as <HTMLDDA> {} or [Function: <HTMLDDA>]
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
@BridgeAR how would i go about adding that <HTMLDDA> tag?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@devsnek adding it requires to skip the loop and to then check for undefined. If that's the case, just return the string '<HTMLDDA>'. The downside of this is, that it would not detect changed prototypes (in case someone changes it with Object.setPrototype()).
Alternatively check https://github.com/nodejs/node/pull/31938/files#diff-91f6ca3fae2551d5959872b74c18946aL495 here for typeof tmp === 'undefined' plus the detected prototype name. Return both in a string in case it's not Object and otherwise return only '<HTMLDDA>'.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
addaleax
added
author ready
PRs with CI started, the required approvals, and no outstanding review comments.
util
Issues and PRs related to the built-in util module.
and removed
lib / src
Issues and PRs involving general changes in the lib/ or src/ directories.
labels
Mar 29, 2020
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
author ready
PRs with CI started, the required approvals, and no outstanding review comments.
util
Issues and PRs related to the built-in util module.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|