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
feat: Add option to conditionally disable site instance patches #18396
feat: Add option to conditionally disable site instance patches #18396
Conversation
DEPS
Outdated
@@ -12,7 +12,7 @@ vars = { | |||
'chromium_version': | |||
'84c40395c741fa24ccbd9fc2c5828e2e97472952', | |||
'node_version': | |||
'a86a4a160dc520c61a602c949a32a1bc4c0fc633', | |||
'b213b26f0fb642b95561c0f10039886607036d5a', |
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.
link to electron/nodejs pr?
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.
Tis just this commit --> electron/node@dee0db9
3901321
to
8c19b11
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.
LGTM in general, naming conventions could be made better :)
80e6965
to
90af9bc
Compare
…able of site instance overrides spec: add tests for the new allowRendererProcessReuse property feat: add console warnings / errors for loading non context-aware native modules * Only error if the patch is disabled * Warn all the time, this will ship in Electron 7
90af9bc
to
0a952e2
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.
LGTM, since its behind a flag don't see any issue with landing.
Release Notes Persisted
|
I was unable to backport this PR to "6-0-x" cleanly; |
* chore: allow conditional disable of the site instance override patches at runtime * feat: add app.allowRendererProcessReuse property to allow runtime disable of site instance overrides spec: add tests for the new allowRendererProcessReuse property feat: add console warnings / errors for loading non context-aware native modules * Only error if the patch is disabled * Warn all the time, this will ship in Electron 7
A maintainer has manually backported this PR to "6-0-x", please check out #18554 |
* chore: allow conditional disable of the site instance override patches at runtime * feat: add app.allowRendererProcessReuse property to allow runtime disable of site instance overrides spec: add tests for the new allowRendererProcessReuse property feat: add console warnings / errors for loading non context-aware native modules * Only error if the patch is disabled * Warn all the time, this will ship in Electron 7
* feat: Add option to conditionally disable site instance patches (#18396) * chore: allow conditional disable of the site instance override patches at runtime * feat: add app.allowRendererProcessReuse property to allow runtime disable of site instance overrides spec: add tests for the new allowRendererProcessReuse property feat: add console warnings / errors for loading non context-aware native modules * Only error if the patch is disabled * Warn all the time, this will ship in Electron 7 * chore: do not warn in about context aware in v6 * chore: update patches
app.allowRendererProcessReuse = true ;pall on electron9.0.0 nodejs 12.17.0 |
Description of Change
This adds a new
app.allowRendererProcessReuse
that allows us to dynamically (at runtime) disable the site instance override patches. The intention is to:app.allowRendererProcessReuse
to switchapp.allowRendererProcessReuse
in Electron 9app.allowRendererProcessReuse
in Electron 10app.allowRendererProcessReuse
in Electron 11Yes you're reading that right, 5 major versions 👍 (60~ish weeks)
For more info see this Discussion Issue
Checklist
npm test
passesStill TODO
console.warn
for loading native modules in the renderer process that are not context-aware or NAPI - This warning will ship in Electron 7Release Notes
Notes: Added new
app.allowRendererProcessReuse
property that allows apps to disable the site instance overrides Electron has patched into Chromium. This can be used to prevent the automatic renderer process restarting that Electron currently does.