Uh oh!
There was an error while loading. Please reload this page.
bootstrap: consolidate global properties definition - #43357
Conversation
nodejs-github-bot
commented
Jun 9, 2022
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jun 9, 2022
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jun 10, 2022
nodejs-github-bot
commented
Jun 10, 2022
nodejs-github-bot
commented
Jun 10, 2022
There was a problem hiding this comment.
| // globalThis.process is been installed at `internal/bootstrap/pre_execution.js`. | |
| // globalThis.process will be installed at `internal/bootstrap/pre_execution.js`. |
There was a problem hiding this comment.
But why are we removing these anyway? Removing these results in a breaking change for the embedders, which is why the tests have to be updated.
There was a problem hiding this comment.
I was reviewing the installation point of globalThis.process and globalThis.Buffer. It can be more intuitive to install them once rather than duplicate the installation.
It is true that removing can cause breaking changes on embedders with custom entry points. What do you think about moving the actual installation here?
There was a problem hiding this comment.
I think the reason that they are overriden in pre_execution is that we thought we were going to make this optional for ESM (probably behind flags), which didn't seem to happen...
There was a problem hiding this comment.
Yeah, that's true. From what I could tell, the current shape of the property descriptor is not going to be changed in anytime soon.
c64d580 to
39394c2CompareUh oh!
There was an error while loading. Please reload this page.
`globalThis.process` and `globalThis.Buffer` has been re-defined with a getter/setter pair. `atob` and `bota` are defined as enumerable properties according to WebIDL definition.
legendecas
commented
Jun 13, 2022
Landed in 511e289 |
`globalThis.process` and `globalThis.Buffer` has been re-defined with a getter/setter pair. `atob` and `bota` are defined as enumerable properties according to WebIDL definition. PR-URL: #43357 Refs: #26882 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
`globalThis.process` and `globalThis.Buffer` has been re-defined with a getter/setter pair. `atob` and `bota` are defined as enumerable properties according to WebIDL definition. PR-URL: #43357 Refs: #26882 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
globalThis.processandglobalThis.Bufferhas been re-defined witha getter/setter pair.
atobandbotaare defined as enumerable properties according toWebIDL definition.
Refs: #26882
Refs: #37786 (comment)