GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — util: fix inspecting document.all by devsnek · Pull Request #31938 · nodejs/node

Conversation

@devsnek

@devsnek devsnek commented Feb 24, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
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
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs involving general changes in the lib/ or src/ directories. label Feb 24, 2020
@devsnek

This comment has been minimized.

Sign in to view
@devsnek
devsnek force-pushed the fix-htmldda branch from d4c8e3c to 71ca809 Compare February 24, 2020 21:57
addaleax
addaleax reviewed Feb 25, 2020
View reviewed changes

@addaleax addaleax left a comment

Copy link
Copy Markdown
Member

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
All reactions
  • 👍 2 reactions
@BridgeAR

This comment has been minimized.

Sign in to view
@devsnek

This comment has been minimized.

Sign in to view
@devsnek
devsnek force-pushed the fix-htmldda branch from 71ca809 to 96caf97 Compare February 26, 2020 18:12
@BridgeAR

This comment has been minimized.

Sign in to view
@devsnek
util: fix inspecting document.all
f66fda7
Fixes: nodejs#31889
@devsnek
devsnek marked this pull request as ready for review March 10, 2020 00:37
@devsnek
devsnek force-pushed the fix-htmldda branch from 96caf97 to f66fda7 Compare March 10, 2020 00:37
@nodejs-github-bot

nodejs-github-bot commented Mar 10, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/29685/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek
devsnek requested review from BridgeAR and addaleax March 11, 2020 00:34
@nodejs-github-bot

nodejs-github-bot commented Mar 11, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/29715/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BridgeAR
BridgeAR reviewed Mar 13, 2020
View reviewed changes

@BridgeAR BridgeAR left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
BridgeAR
BridgeAR reviewed Mar 13, 2020
View reviewed changes
Comment thread lib/internal/util/inspect.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@devsnek

devsnek commented Mar 13, 2020

Copy link
Copy Markdown
Member Author

@BridgeAR how would i go about adding that <HTMLDDA> tag?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek

devsnek commented Mar 18, 2020

Copy link
Copy Markdown
Member Author

@BridgeAR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Mar 18, 2020

Copy link
Copy Markdown
Member

@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>'.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax
addaleax approved these changes Mar 20, 2020
View reviewed changes
cjihrig
cjihrig approved these changes Mar 20, 2020
View reviewed changes
awibox
awibox approved these changes Mar 20, 2020
View reviewed changes
@addaleax 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
@nodejs-github-bot

nodejs-github-bot commented Mar 29, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/30216/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Mar 30, 2020

Copy link
Copy Markdown
Member

Landed in 89ae1f1

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax pushed a commit that referenced this pull request Mar 30, 2020
@devsnek @addaleax
util: fix inspecting document.all
89ae1f1
Fixes: #31889

PR-URL: #31938
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@addaleax addaleax closed this Mar 30, 2020
addaleax pushed a commit that referenced this pull request Mar 30, 2020
@devsnek @addaleax
util: fix inspecting document.all
6d86651
Fixes: #31889

PR-URL: #31938
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@targos targos mentioned this pull request Apr 13, 2020
v13.13.0 release proposal #32813
Merged
targos pushed a commit that referenced this pull request Apr 22, 2020
@devsnek @targos
util: fix inspecting document.all
eccd2a7
Fixes: #31889

PR-URL: #31938
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@targos targos mentioned this pull request Apr 22, 2020
v12.16.3 release proposal #33009
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@BridgeAR BridgeAR BridgeAR left review comments
@addaleax addaleax addaleax approved these changes
@cjihrig cjihrig cjihrig approved these changes
+1 more reviewer
@awibox awibox awibox approved these changes
Reviewers whose approvals may not affect merge requirements

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.

Projects

None yet

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.

6 participants

@devsnek @BridgeAR @nodejs-github-bot @addaleax @awibox @cjihrig
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.