You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Problem Description
We are using electron-mksnapshot to generate a custom v8 snapshot for our application that is desired to run only in the main process, not the renderer process. While debugging our app, we noticed that the snapshot is available to the renderer process even with nodeIntegration disabled.
We noticed that electron is patching chromium to always load the v8 snapshots, with a comment indicating that this is required. Is loading the v8 snapshot required even when nodeIntegration is disabled?
We would like for there to be a way to use our custom snapshot in the main process but use the default snapshot (or no snapshot with nodeIntegration disabled) in the browser process.
Proposed Solution
This could be done a variety of ways, but one possibility would be to update the patch to not load the custom snapshot when node integration is disabled. Or if it's desired sometimes to have node integration disabled and a v8 snapshot included, you could have an additional parameter that specifies as such.
Alternatives Considered
One alternative for us would be to have separate main electron processes: one for the bulk of our main code that uses the snapshot, and one to purely launch the browser that doesn't launch the snapshot. This is undesirable as it significantly complicates the code and potentially bloats the size of our binary.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Hopefully someone from the core team will see this. We recently updated the content above to clarify the problem we're seeing as well as the desired solution.
ryanthemanuel
changed the title
[Feature Request]: Allow a custom v8 snapshot to only be loaded in the main process and not in the browser process
[Feature Request]: Allow custom v8 snapshots to be used in the main process and the default snapshot in the browser process
Aug 8, 2022
Preflight Checklist
Problem Description
We are using
electron-mksnapshot
to generate a custom v8 snapshot for our application that is desired to run only in the main process, not the renderer process. While debugging our app, we noticed that the snapshot is available to the renderer process even with nodeIntegration disabled.We noticed that electron is patching chromium to always load the v8 snapshots, with a comment indicating that this is required. Is loading the v8 snapshot required even when nodeIntegration is disabled?
We would like for there to be a way to use our custom snapshot in the main process but use the default snapshot (or no snapshot with nodeIntegration disabled) in the browser process.
Proposed Solution
This could be done a variety of ways, but one possibility would be to update the patch to not load the custom snapshot when node integration is disabled. Or if it's desired sometimes to have node integration disabled and a v8 snapshot included, you could have an additional parameter that specifies as such.
Alternatives Considered
One alternative for us would be to have separate main electron processes: one for the bulk of our main code that uses the snapshot, and one to purely launch the browser that doesn't launch the snapshot. This is undesirable as it significantly complicates the code and potentially bloats the size of our binary.
Additional Information
No response
The text was updated successfully, but these errors were encountered: