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

crypto: put legacy _handle accessors on prototypes #24269

Closed
wants to merge 1 commit into from

Conversation

targos
Copy link
Member

@targos targos commented Nov 9, 2018

Creating deprecated accessors each time an object is created is very
time consuming.

Refs: #22747
Fixes: #24266

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

Creating deprecated accessors each time an object is created is very
time consuming.

Refs: nodejs#22747
Fixes: nodejs#24266
@targos targos requested a review from tniessen November 9, 2018 09:15
@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Nov 9, 2018
@targos targos added crypto Issues and PRs related to the crypto subsystem. performance Issues and PRs related to the performance of Node.js. and removed lib / src Issues and PRs related to general changes in the lib or src directory. labels Nov 9, 2018
@bnoordhuis
Copy link
Member

Why wasn't the ._handle property removed outright? The whole point of moving away from that was that it's unsafe to use outside core.

@sam-github
Copy link
Contributor

Wasn't removed outright because it breaks native modules using it. Deprecation was the first step, outright removal will happen in next major (I think, I'm a bit fuzzy on how fast we can do these things now).

@tniessen
Copy link
Member

tniessen commented Nov 9, 2018

I originally proposed to remove them, but we agreed to add a deprecation cycle first.

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM but if BC is a concern, then keep in mind that this change affects code that checks obj.hasOwnProperty('_handle').

@Trott
Copy link
Member

Trott commented Nov 10, 2018

@targos
Copy link
Member Author

targos commented Nov 11, 2018

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 11, 2018
@targos
Copy link
Member Author

targos commented Nov 11, 2018

Landed in e83d7e8.

@targos targos closed this Nov 11, 2018
@targos targos deleted the fix-24266 branch November 11, 2018 19:03
targos added a commit that referenced this pull request Nov 11, 2018
Creating deprecated accessors each time an object is created is very
time consuming.

Refs: #22747
Fixes: #24266

PR-URL: #24269
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
BridgeAR pushed a commit that referenced this pull request Nov 14, 2018
Creating deprecated accessors each time an object is created is very
time consuming.

Refs: #22747
Fixes: #24266

PR-URL: #24269
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
kiyomizumia pushed a commit to kiyomizumia/node that referenced this pull request Nov 15, 2018
Creating deprecated accessors each time an object is created is very
time consuming.

Refs: nodejs#22747
Fixes: nodejs#24266

PR-URL: nodejs#24269
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@codebytere
Copy link
Member

codebytere commented Dec 14, 2018

@targos is this something we'd potentially want to backport to v10.x? The bug report refs v11.1 so i'm unclear if this degradation is present in 10.x

@targos
Copy link
Member Author

targos commented Dec 15, 2018

The change that warranted this was semver-major and isn't in v10.x

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. crypto Issues and PRs related to the crypto subsystem. performance Issues and PRs related to the performance of Node.js.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants