Skip to content

process: maintain constructor descriptor#9306

Closed
bengl wants to merge 1 commit into
nodejs:masterfrom
bengl:processconstructor
Closed

process: maintain constructor descriptor#9306
bengl wants to merge 1 commit into
nodejs:masterfrom
bengl:processconstructor

Conversation

@bengl

@bengl bengl commented Oct 27, 2016

Copy link
Copy Markdown
Member
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

process

Description of change

Use the original property descriptor instead of just taking the value,
which would previously, by default, be non-writable and non-configurable.

It didn't appear that it was intentional for process.constructor's descriptor
to be locked down, but it was, by using a simple {value: ...} descriptor.

Use the original property descriptor instead of just taking the value,
which would, by default, be non-writable and non-configurable.
@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, 2016
@jasnell

jasnell commented Oct 27, 2016

Copy link
Copy Markdown
Member

LGTM with green CI

@bengl

bengl commented Oct 27, 2016

Copy link
Copy Markdown
Member Author

@cjihrig cjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but it's not entirely clear to me what you're hoping to accomplish with this change.

@Fishrock123

Copy link
Copy Markdown
Contributor

What's this aiming to solve? 🤔

@bengl

bengl commented Oct 29, 2016

Copy link
Copy Markdown
Member Author

@Fishrock123 an inconsistency in what's publicly provided in node. We're doing some automated iterating over node's public API objects, and inconsistencies can trip up our code. We can write in some exceptions, but it would be nice to not have to, especially in this case, as the non-configurability is not actually required here (it seems), and was just put there due to the way the property descriptor was originally used there.

@jasnell

jasnell commented Dec 5, 2016

Copy link
Copy Markdown
Member

@Fishrock123 ... you good with this?

@jasnell

jasnell commented Jan 11, 2017

Copy link
Copy Markdown
Member

ping @Fishrock123

@jasnell

jasnell commented Mar 24, 2017

Copy link
Copy Markdown
Member

Ping... status on this one?

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Mar 24, 2017

@addaleax addaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, I see no problem with landing this.

@addaleax addaleax removed the stalled Issues and PRs that are stalled. label Mar 24, 2017
@addaleax

Copy link
Copy Markdown
Member

Fresh CI: https://ci.nodejs.org/job/node-test-commit/8674/

Will land if it comes back green.

@addaleax

Copy link
Copy Markdown
Member

Landed in e0bc5a7

@addaleax addaleax closed this Mar 24, 2017
addaleax pushed a commit that referenced this pull request Mar 24, 2017
Use the original property descriptor instead of just taking the value,
which would, by default, be non-writable and non-configurable.

PR-URL: #9306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 28, 2017
Use the original property descriptor instead of just taking the value,
which would, by default, be non-writable and non-configurable.

PR-URL: #9306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 28, 2017
@italoacasas italoacasas mentioned this pull request Apr 10, 2017
2 tasks
@MylesBorins

Copy link
Copy Markdown
Contributor

should this be backported? it lands cleanly.

@bengl

bengl commented Apr 19, 2017

Copy link
Copy Markdown
Member Author

@MylesBorins I'd say yes.

MylesBorins pushed a commit that referenced this pull request May 15, 2017
Use the original property descriptor instead of just taking the value,
which would, by default, be non-writable and non-configurable.

PR-URL: #9306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@MylesBorins MylesBorins mentioned this pull request May 23, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
Use the original property descriptor instead of just taking the value,
which would, by default, be non-writable and non-configurable.

PR-URL: nodejs/node#9306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

8 participants