src: move handle properties to prototype by bnoordhuis · Pull Request #16482 · nodejs/node

added 2 commits

October 25, 2017 10:23
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

tniessen

addaleax

@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 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 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

@jure jure mentioned this pull request

Dec 13, 2017

4 tasks

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

@g-sam g-sam mentioned this pull request

Apr 10, 2018

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

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>