-
Notifications
You must be signed in to change notification settings - Fork 16.9k
feat: add webPreferences.frozenIntrinsics
#38571
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
Conversation
89889a8 to
20339aa
Compare
00944ef to
45e733a
Compare
b37e361 to
093997d
Compare
ee2f793 to
1944ce9
Compare
webPreferences.frozenIntrinsics
codebytere
left a comment
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.
Your PR body doesn't describe the goal of adding this option - why is it something developers would want to enable? What benefits does it confer and where could someone read more about that? Given it's experimental in Node.js, should we wait until it's stable?
patches/node/fix_make_sharedarraybuffer_optional_in_freeze_intrinsics_js.patch
Outdated
Show resolved
Hide resolved
1944ce9 to
28e03dd
Compare
jkleinsc
left a comment
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.
API LGTM
codebytere
left a comment
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.
API LGTM
5f36197 to
b4714ca
Compare
cfdcc9d to
94b9feb
Compare
94b9feb to
6ba8835
Compare
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.
The API name implies all intrinsics in the WebContents will be frozen, but it seems that this only affects the intrinsics in Node context?
If this means to be Node context only, I think the API name should make that explicit, or we can probably add a nodeIntegrationArgs: [] options instead.
| every iframe, you can use `process.isMainFrame` to determine if you are | ||
| in the main frame or not. | ||
| * `frozenIntrinsics` boolean (optional) - Experimental option for passing | ||
| [`--frozen-intrinsics`](https://nodejs.org/api/cli.html#--frozen-intrinsics) to Node.js. |
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.
The document should clarity whether this requires nodeIntegration: true to work, and how it works with contextIsolate: true.
|
@miniak is there still interest in adding this feature? |
|
I'm closing this for now, but feel free to reopen after rebasing. |
Description of Change
Allows enabling the experimental https://nodejs.org/api/cli.html#--frozen-intrinsics
Checklist
npm testpassesRelease Notes
Notes: Added
webPreferences.frozenIntrinsics, which passes--frozen-intrinsicsto node.