From f5dd85994543cd853bcfc451a683ff4053acb876 Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Mon, 29 Aug 2022 11:56:11 -0500 Subject: [PATCH] feat: add fuse for custom v8 snapshot path on browser process --- README.md | 3 ++- src/config.ts | 1 + src/index.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88c99ea..185d3f6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ await flipFuses( [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // Disables the NODE_OPTIONS environment variable [FuseV1Options.EnableNodeCliInspectArguments]: false, // Disables the --inspect and --inspect-brk family of ClI options [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, // Enables validation of the app.asar archive on macOS - [FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of it's normall search paths + [FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of it's normal search paths + [FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true, // Loads V8 Snapshot from `browser_v8_context_snapshot.bin` for the browser process }, ); ``` diff --git a/src/config.ts b/src/config.ts index 21512a5..bc75ead 100644 --- a/src/config.ts +++ b/src/config.ts @@ -12,6 +12,7 @@ export enum FuseV1Options { EnableNodeCliInspectArguments = 3, EnableEmbeddedAsarIntegrityValidation = 4, OnlyLoadAppFromAsar = 5, + LoadBrowserProcessSpecificV8Snapshot = 6, } export type FuseV1Config = { diff --git a/src/index.ts b/src/index.ts index b89f2b6..0df40d4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,6 +29,7 @@ const buildFuseV1Wire = (config: FuseV1Config, wireLength: number) => { state(config[FuseV1Options.EnableNodeCliInspectArguments]), state(config[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]), state(config[FuseV1Options.OnlyLoadAppFromAsar]), + state(config[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]), ]; };