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: use primordials when calling methods of Error global object #35837

Closed

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Oct 27, 2020

This is to unsure that code using those methods won't crash if the
methods are deleted in userland.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 27, 2020
@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Oct 27, 2020
@Trott
Copy link
Member

Trott commented Oct 27, 2020

Should we add a test that crashes things now but won't crash with this change?

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 27, 2020
@nodejs-github-bot

This comment has been minimized.

@devsnek
Copy link
Member

devsnek commented Oct 27, 2020

Shouldn't we use primordials instead?

This is to unsure that code using those methods won't crash if the
methods are deleted in userland.
@aduh95
Copy link
Contributor Author

aduh95 commented Oct 28, 2020

Shouldn't we use primordials instead?

Actually we can. I don't know why I had the preconceived notion that Error was not accessible from primordials. Thanks for the suggestion, I've implemented it.

Should we add a test that crashes things now but won't crash with this change?

@Trott Is it still needed now that I'm using primordials?

@aduh95 aduh95 force-pushed the error-prototype-optional-chaining branch from 9455338 to b642e52 Compare October 28, 2020 09:42
@aduh95 aduh95 changed the title lib: use optional chaining when calling methods of Error prototype lib: use primordials when calling methods of Error global object Oct 28, 2020
@aduh95 aduh95 added request-ci Add this label to start a Jenkins CI on a PR. and removed dont-land-on-v10.x request-ci Add this label to start a Jenkins CI on a PR. labels Oct 28, 2020
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 28, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 28, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 28, 2020
@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 30, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 30, 2020
@github-actions
Copy link
Contributor

Landed in 05bb1b3...1da6729

@github-actions github-actions bot closed this Oct 30, 2020
nodejs-github-bot pushed a commit that referenced this pull request Oct 30, 2020
This is to unsure that code using those methods won't crash if the
methods are deleted in userland.

PR-URL: #35837
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
targos pushed a commit that referenced this pull request Nov 3, 2020
This is to unsure that code using those methods won't crash if the
methods are deleted in userland.

PR-URL: #35837
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
@targos targos mentioned this pull request Nov 3, 2020
BethGriggs pushed a commit that referenced this pull request Dec 8, 2020
This is to unsure that code using those methods won't crash if the
methods are deleted in userland.

PR-URL: #35837
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
BethGriggs pushed a commit that referenced this pull request Dec 10, 2020
This is to unsure that code using those methods won't crash if the
methods are deleted in userland.

PR-URL: #35837
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 10, 2020
BethGriggs pushed a commit that referenced this pull request Dec 15, 2020
This is to unsure that code using those methods won't crash if the
methods are deleted in userland.

PR-URL: #35837
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
@aduh95 aduh95 deleted the error-prototype-optional-chaining branch July 16, 2022 16:31
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. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants