-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: use the config binding to carry --no-browser-globals #26228
Conversation
// it from the process. We may consider exposing it properly in | ||
// process.features. | ||
const { noBrowserGlobals } = internalBinding('config'); | ||
process._noBrowserGlobals = noBrowserGlobals; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the behavior to the former.
Before, this variable was only set in case it was true. Now it's set unconditionally.
It is now also set as a regular property and not only as read-only.
Ping @joyeecheung |
Instead of setting it in the process object, since this is a configure-time option. Also added a shim that can be deprecated and removed some time later.
59f5589
to
b41afa4
Compare
@BridgeAR Thanks for review, updated. CI: https://ci.nodejs.org/job/node-test-pull-request/21255/ ✔️ |
Instead of setting it in the process object, since this is a configure-time option. Also added a shim that can be deprecated and removed some time later. PR-URL: nodejs#26228 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Landed in 03c71a9 🎉 |
Instead of setting it in the process object, since this is a configure-time option. Also added a shim that can be deprecated and removed some time later. PR-URL: nodejs#26228 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Instead of setting it in the process object, since this is a configure-time option. Also added a shim that can be deprecated and removed some time later. PR-URL: #26228 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This is actually causing some problems in Electron. We load Node in 2 different environments:
By turning this config into compile-time only, we are not able to switch modes at runtime. /cc @nitsakh @codebytere |
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
@zcbenz Hi, I am pretty sure I think we can make the installation dynamic at run time, though |
@joyeecheung We hijacked the bootstrap script to install some Electron specific things to Node. Having a dynamic flag would be great. |
@zcbenz If you just hijack the property passed into bootstrap script and only need it once, maybe the easiest workaround is to hijack |
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
This is a temporary hack in responding to Node's change: nodejs/node#26228 We need to figure out a better solution.
Instead of setting it in the process object, since this is
a configure-time option. Also added a shim that can be
deprecated and removed some time later.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes