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
fix: disable nodeIntegrationInWorker
for certain Worker types
#35919
Conversation
nodeIntegrationInWorker
for certain Worker types
df52c30
to
30aa450
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.
Given that we supported this feature for these worker types before, should this be a semver/minor
? Also can you add release notes since it is user facing change. Thanks!
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.
Can you also mention this behavior in nodeIntegrationInWorker
's docs?
c39966f
to
d7fa48c
Compare
@zcbenz / @deepak1556 would you mind adding API LGTM? |
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
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
Release Notes Persisted
|
I have automatically backported this PR to "21-x-y", please check out #36009 |
I have automatically backported this PR to "22-x-y", please check out #36010 |
…tron#35919) fix: disable nodeIntegrationInWorker for certain Worker types
Description of Change
Closes #31452.
Out-of-process Workers present significant crash and bug surface area as a result of Electron's current inability to control their sandbox policies. As a result, we shouldn't initialize Node environment for SharedWorkers and ServiceWorkers to avoid problems when in sandboxed environment.
After this change, the
nodeIntegrationInWorker
attribute should only affect workers that run in-process of the associated BrowserWindow.Checklist
npm test
passesRelease Notes
Notes: Removed support for
nodeIntegrationInWorker
in Service Workers and Shared Workers owing to sandboxing policies.