Visitar URL original
util: use hasOwnProperty() primordial by Trott · Pull Request #41692 · nodejs/node · GitHub
The Wayback Machine - https://web.archive.org/web/20220321210802/https://github.com/nodejs/node/pull/41692
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: use hasOwnProperty() primordial #41692

Merged
merged 1 commit into from Jan 27, 2022
Merged

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 25, 2022 •

Use primordial ObjectPrototypeHasOwnProperty primordial.

@Trott

This comment has been hidden.

@Trott Trott removed the request-ci label Jan 25, 2022
Copy link
Member

@benjamingr benjamingr left a comment

Does this need don't backport labels?

@Trott Trott changed the title inspector: use ObjectHasOwn primordial util: use ObjectHasOwn primordial Jan 25, 2022
@Trott
Copy link
Member Author

@Trott Trott commented Jan 25, 2022

Does this need don't backport labels?

Added. Thanks.

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Jan 25, 2022

bnb
bnb approved these changes Jan 25, 2022
Copy link
Member

@bnb bnb left a comment

this looks right to me :)

lpinca
lpinca approved these changes Jan 25, 2022
@Trott Trott changed the title util: use ObjectHasOwn primordial util: use hasOwnProperty() primordial Jan 25, 2022
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Jan 25, 2022

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Jan 26, 2022

@benjamingr
Copy link
Member

@benjamingr benjamingr commented Jan 26, 2022

May also want to edit the commit message ( use hasOwnProperty() primordial -> use ObjectHasOwn primordial ?)

@Trott
Copy link
Member Author

@Trott Trott commented Jan 26, 2022

May also want to edit the commit message ( use hasOwnProperty() primordial -> use ObjectHasOwn primordial ?)

Done, but the other way around. There is no ObjectHasOwn primordial which I guess makes sense because it would be the same as the ObjectPrototypeHasOwnProperty primordial--same arguments and everything. But I'm not sure why ObjectHasOwn doesn't exist. So I just switched it to ObjectPrototypeHasOwnProperty. ¯\(ツ)/¯

@benjamingr
Copy link
Member

@benjamingr benjamingr commented Jan 26, 2022

@Trott then this is probably fine to backport?

@Trott
Copy link
Member Author

@Trott Trott commented Jan 26, 2022

@Trott then this is probably fine to backport?

Oh, yes, good point! I'll remove those labels.

@nodejs-github-bot

This comment has been hidden.

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Jan 27, 2022

Commit Queue failed
- Loading data for nodejs/node/pull/41692
✔  Done loading data for nodejs/node/pull/41692
----------------------------------- PR info ------------------------------------
Title      util: use hasOwnProperty() primordial  (#41692)
Author     Rich Trott  (@Trott)
Branch     Trott:hasown-inspector -> nodejs:master
Labels     util, needs-ci
Commits    1
 - util: use hasOwnProperty() primordial
Committers 1
 - Rich Trott 
PR-URL: https://github.com/nodejs/node/pull/41692
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Tierney Cyren 
Reviewed-By: Luigi Pinca 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/41692
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Tierney Cyren 
Reviewed-By: Luigi Pinca 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last review:
   ⚠  - util: use hasOwnProperty() primordial
   ℹ  This PR was created on Tue, 25 Jan 2022 15:16:03 GMT
   ✔  Approvals: 3
   ✔  - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/41692#pullrequestreview-862441837
   ✔  - Tierney Cyren (@bnb): https://github.com/nodejs/node/pull/41692#pullrequestreview-862639477
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/41692#pullrequestreview-862732432
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2022-01-27T05:45:45Z: https://ci.nodejs.org/job/node-test-pull-request/42158/
- Querying data for job/node-test-pull-request/42158/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/1758126043

Avoid Object.prototype.hasOwnProperty. Use primordial instead.

PR-URL: nodejs#41692
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@Trott
Copy link
Member Author

@Trott Trott commented Jan 27, 2022

Landed in acc92a7

@Trott Trott merged commit acc92a7 into nodejs:master Jan 27, 2022
36 checks passed
@Trott Trott deleted the hasown-inspector branch Jan 27, 2022
Linkgoron added a commit to Linkgoron/node that referenced this issue Jan 31, 2022
Avoid Object.prototype.hasOwnProperty. Use primordial instead.

PR-URL: nodejs#41692
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
ruyadorno added a commit that referenced this issue Feb 8, 2022
Avoid Object.prototype.hasOwnProperty. Use primordial instead.

PR-URL: #41692
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams added a commit that referenced this issue Mar 2, 2022
Avoid Object.prototype.hasOwnProperty. Use primordial instead.

PR-URL: #41692
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams added a commit that referenced this issue Mar 3, 2022
Avoid Object.prototype.hasOwnProperty. Use primordial instead.

PR-URL: #41692
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams added a commit that referenced this issue Mar 14, 2022
Avoid Object.prototype.hasOwnProperty. Use primordial instead.

PR-URL: #41692
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants