GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — util: freeze `kEnumerableProperty` by LiviaMedeiros · Pull Request #43390 · nodejs/node Conversation
Member
Refs: #43159 (comment)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
aduh95
reviewed
Comment on lines
32
to
40
|
| assert.strictEqual( | |
| Object.isExtensible(kEnumerableProperty), | |
| false | |
| ); | |
| assert.strictEqual( | |
| Object.isSealed(kEnumerableProperty), | |
| true | |
| ); | |
| assert.strictEqual( | |
| Object.isFrozen(kEnumerableProperty), | |
| true | |
| ); | |
| assert.throws( | |
| () => { kEnumerableProperty.configurable = false; }, | |
| TypeError | |
| ); | |
| assert.throws( | |
| () => Object.assign(kEnumerableProperty, { configurable: false }), | |
| TypeError | |
| ); | |
| assert.throws( | |
| () => Object.assign(kEnumerableProperty, { enumerable: false }), | |
| TypeError | |
| ); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Conceptually agreed. :)
My concern here is that by assuming alternatives to freezing and possibility of something dangerous (e.g. if there will be unavoidable exposing reference to kEnumerableProperty for userland) we must keep in mind every single way to break it.
If that approach will become common in core, we'll have to create an exhaustive isImmutable() helper function instead.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Looks like CI got borked recently |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/44486/ 🔁 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
174856c to
7a84b9b
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: nodejs#43390 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
7a84b9b to
0f90879
Compare
|
Landed in 0f90879 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: #43390 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #43390 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #43390 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#43390 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.