async_hooks: improve property descriptors in als.bind by Flarna · Pull Request #34620 · nodejs/node

@Flarna

The length property should be non enumerable to match behavior of
normal functions.

The asyncResource property is enumerable and therefore it should be
also writable to avoid issues like there:
nodejs#30932 (comment)

Both properties should be configurable.

Refs: nodejs#34574

@nodejs-github-bot added the async_hooks

Issues and PRs related to the async hooks subsystem.

label

Aug 4, 2020

puzpuzpuz

@Flarna Flarna added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Aug 4, 2020

addaleax

Flarna added a commit that referenced this pull request

Aug 4, 2020
The length property should be non enumerable to match behavior of
normal functions.

The asyncResource property is enumerable and therefore it should be
also writable to avoid issues like there:
#30932 (comment)

Both properties should be configurable.

Refs: #34574

PR-URL: #34620
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>

@Flarna Flarna changed the title [async_hooks] improve property descriptors in als.bind async_hooks: improve property descriptors in als.bind

Aug 4, 2020

@Flarna Flarna deleted the als-bind-props branch

August 4, 2020 16:06

addaleax pushed a commit that referenced this pull request

Aug 8, 2020
The length property should be non enumerable to match behavior of
normal functions.

The asyncResource property is enumerable and therefore it should be
also writable to avoid issues like there:
#30932 (comment)

Both properties should be configurable.

Refs: #34574

PR-URL: #34620
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>

codebytere pushed a commit that referenced this pull request

Aug 11, 2020
The length property should be non enumerable to match behavior of
normal functions.

The asyncResource property is enumerable and therefore it should be
also writable to avoid issues like there:
#30932 (comment)

Both properties should be configurable.

Refs: #34574

PR-URL: #34620
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>

addaleax pushed a commit that referenced this pull request

Sep 22, 2020
The length property should be non enumerable to match behavior of
normal functions.

The asyncResource property is enumerable and therefore it should be
also writable to avoid issues like there:
#30932 (comment)

Both properties should be configurable.

Refs: #34574

PR-URL: #34620
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>