fix(linux): update electron to avoid crash on 16k page size (#2271)

This commit is contained in:
Baptiste Augrain
2025-03-18 19:47:00 +01:00
committed by GitHub
parent bc784e7823
commit b63c8404c3
5 changed files with 219 additions and 194 deletions

View File

@@ -0,0 +1,17 @@
diff --git a/src/main.ts b/src/main.ts
index c132c9b..51a7290 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -524,2 +524,12 @@ function getJSFlags(cliArgs: NativeParsedArgs): string | null {
+ // Fix cppgc crash on Linux with 16KB page size.
+ // Refs https://issues.chromium.org/issues/378017037
+ // The fix from https://github.com/electron/electron/commit/6c5b2ef55e08dc0bede02384747549c1eadac0eb
+ // only affects non-renderer process.
+ // The following will ensure that the flag will be
+ // applied to the renderer process as well.
+ // TODO: Remove this once we update to
+ // Chromium >= 134.
+ jsFlags.push('--nodecommit_pooled_pages');
+
return jsFlags.length > 0 ? jsFlags.join(' ') : null;