feat: allow custom v8 snapshots to be used in the main process and the default snapshot in the renderer process (#35266)

* Updates to allow for using a custom v8 snapshot file name

* Allow using a custom v8 snapshot file name

* Fix up patch due to merge

* Use fuse to set up custom v8 snapshot file in browser process

* Refactor to use delegate instead of command line parameter

* Refactoring

* Update due to merge

* PR comments

* Rename patch

* Rename patch
This commit is contained in:
Ryan Manuel 2022-09-15 15:21:16 -05:00 committed by GitHub
parent 5cf15cdab7
commit f25c87dc70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 183 additions and 1 deletions

View file

@ -54,6 +54,13 @@ For more information on how to use asar integrity validation please read the [As
The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.
### `loadBrowserProcessSpecificV8Snapshot`
**Default:** Disabled
**@electron/fuses:** `FuseV1Options.LoadBrowserProcessSpecificV8Snapshot`
The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do.
## How do I flip the fuses?
### The easy way