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

src: move handle properties to prototype #16482

Closed
wants to merge 2 commits into from

Conversation

bnoordhuis
Copy link
Member

@bnoordhuis bnoordhuis commented Oct 25, 2017

Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template. They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use args.This() instead of args.Holder().

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

Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. dgram Issues and PRs related to the dgram subsystem / UDP. labels Oct 25, 2017
Copy link
Member

@fhinkel fhinkel left a comment

Choose a reason for hiding this comment

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

Thanks!

@addaleax
Copy link
Member

Landed in 7c3d6cc, de61f97

@addaleax addaleax closed this Oct 29, 2017
@addaleax addaleax added lib / src Issues and PRs related to general changes in the lib or src directory. and removed dgram Issues and PRs related to the dgram subsystem / UDP. labels Oct 29, 2017
addaleax pushed a commit that referenced this pull request Oct 29, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax pushed a commit that referenced this pull request Oct 29, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
gibfahn pushed a commit that referenced this pull request Oct 31, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
gibfahn pushed a commit that referenced this pull request Oct 31, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: nodejs/node#16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: nodejs/node#16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: nodejs/node#16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: nodejs/node#16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins
Copy link
Contributor

This lands cleanly on v6.x

Please lmk if it should be backed out

MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins MylesBorins mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: #16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
Accessors implicitly run inside a HandleScope, UDPWrap::GetFD() doesn't
need to create one explicitly.

PR-URL: nodejs/node#16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
Reduce the size of wrap objects by moving a couple of accessors from the
instance template to the prototype template.  They occupied one slot per
instance instead of one slot per class.

This commit fixes some instances of unwrapping twice since that code had
to be updated anyway to use `args.This()` instead of `args.Holder()`.

PR-URL: nodejs/node#16482
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
jure added a commit to jure/node that referenced this pull request Dec 13, 2017
apapirovski pushed a commit that referenced this pull request Dec 17, 2017
PR-URL: #17665
Fixes: #17636
Refs: #16482
Refs: #16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Jan 8, 2018
PR-URL: #17665
Fixes: #17636
Refs: #16482
Refs: #16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
PR-URL: #17665
Fixes: #17636
Refs: #16482
Refs: #16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
boingoing pushed a commit to nodejs/node-chakracore that referenced this pull request Jan 18, 2018
PR-URL: nodejs/node#17665
Fixes: nodejs/node#17636
Refs: nodejs/node#16482
Refs: nodejs/node#16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
kjin pushed a commit to kjin/node that referenced this pull request Apr 28, 2018
PR-URL: nodejs#17665
Fixes: nodejs#17636
Refs: nodejs#16482
Refs: nodejs#16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request May 2, 2018
Backport-PR-URL: #20456
PR-URL: #17665
Fixes: #17636
Refs: #16482
Refs: #16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
ckerr pushed a commit to electron/node that referenced this pull request Jun 14, 2018
PR-URL: nodejs/node#17665
Fixes: nodejs/node#17636
Refs: nodejs/node#16482
Refs: nodejs/node#16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
ckerr added a commit to electron/node that referenced this pull request Jun 15, 2018
* src: replace SetAccessor w/ SetAccessorProperty

PR-URL: nodejs/node#17665
Fixes: nodejs/node#17636
Refs: nodejs/node#16482
Refs: nodejs/node#16860
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

* test: make test-tls-external-accessor agnostic

Remove reliance on V8-specific error messages in
test/parallel/test-tls-external-accessor.js.

Check that the error is a `TypeError`.

The test should now be successful without modification using ChakraCore.

Backport-PR-URL: nodejs/node#20456
PR-URL: nodejs/node#16272
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. 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.

7 participants