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

lib: minor fix equality comparison #30898

Closed
wants to merge 1 commit into from
Closed

lib: minor fix equality comparison #30898

wants to merge 1 commit into from

Conversation

PW486
Copy link
Contributor

@PW486 PW486 commented Dec 11, 2019

Change '==' to '===' in v8_prof_polyfill.js, punycode.js.

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

Change '==' to '===' in v8_prof_polyfill.js, punycode.js.
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Dec 11, 2019
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a green CI

@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
Member

targos commented Dec 12, 2019

don't we still treat punycode as an external dependency that we don't patch directly?

@BridgeAR
Copy link
Member

@targos not anymore as far as I can tell. We did update e.g. var.

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a very specific reason that we used == in prof_polyfill but I don't recall what it was.... Going to "request changes" for a bit while I dig through logs to try to find out. Sorry about that.

@Trott
Copy link
Member

Trott commented Dec 13, 2019

There was a very specific reason that we used == in prof_polyfill but I don't recall what it was.... Going to "request changes" for a bit while I dig through logs to try to find out. Sorry about that.

Argh, I see it was recently de-var'ed which I think might also be a problem. I might be confusing it with another file though.

@targos not anymore as far as I can tell. We did update e.g. var.

But it looks like maybe we upstreamed that change....

@Trott
Copy link
Member

Trott commented Dec 13, 2019

This should probably be split into two commits, one for each file?

@Trott
Copy link
Member

Trott commented Dec 13, 2019

@nodejs/v8 @matthewloring Am I wrong about == in v8_prof_polyfill.js being significant somehow? I'm guessing I'm wrong/mistaken/misremembering but I would really prefer to have that confirmed by someone knowledgable.

@BridgeAR
Copy link
Member

@Trott here's an overview for loose equalities: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using

Objects with a Symbol.toPrimitive or toString attached would work differently now (they could match before). Other comparison will not be impacted.

I do not know if that was intentional but I doubt it.

@Trott
Copy link
Member

Trott commented Dec 13, 2019

@Trott here's an overview for loose equalities: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using

Objects with a Symbol.toPrimitive or toString attached would work differently now (they could match before). Other comparison will not be impacted.

I do not know if that was intentional but I doubt it.

I thought it had to do with side effects in V8 under the hood that would affect profiling but not anything normally visible to the end user. I'm probably wrong and will remove my request for changes.

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 13, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Trott pushed a commit that referenced this pull request Dec 14, 2019
Change '==' to '===' in v8_prof_polyfill.js, punycode.js.

PR-URL: #30898
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott
Copy link
Member

Trott commented Dec 14, 2019

Landed in 9c460e1.

Thanks for the contribution! 🎉

@Trott Trott closed this Dec 14, 2019
MylesBorins pushed a commit that referenced this pull request Dec 17, 2019
Change '==' to '===' in v8_prof_polyfill.js, punycode.js.

PR-URL: #30898
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 17, 2019
targos pushed a commit that referenced this pull request Jan 14, 2020
Change '==' to '===' in v8_prof_polyfill.js, punycode.js.

PR-URL: #30898
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
Change '==' to '===' in v8_prof_polyfill.js, punycode.js.

PR-URL: #30898
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants