electron/patches/chromium/load_v8_snapshot_in_browser_process.patch
electron-roller[bot] 03aad28412
chore: bump chromium to 140.0.7327.0 (main) (#47902)
* chore: bump chromium in DEPS to 140.0.7324.0

* chore: bump chromium in DEPS to 140.0.7325.0

* chore: remove @dsanders11's unused include patch
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6782507

* fix: apply keychain patch to new apple subdir
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6736212

* chore: update chromium patches

* chore: update other patches

* chore: bump chromium in DEPS to 140.0.7327.0

* fix: mistake in reapplied patch

* fixup! fix: apply keychain patch to new apple subdir CL: https://chromium-review.googlesource.com/c/chromium/src/+/6736212

* chore: update patches

* fix: remove OnPrivateNetworkAccessPermissionRequired override
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6769208

* fix: update colorSpace property to use new unified value
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6795085

* fix: include OverlayWindowLiveCaptionButton
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787420

* fixup! fix: apply keychain patch to new apple subdir CL: https://chromium-review.googlesource.com/c/chromium/src/+/6736212

* fix: format chromium_src/BUILD.gn
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787427

* fix: format BUILD.gn
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787427

* chore: include script/ in logged path

* fix: update filenames.libcxx.gni
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787279

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-07-31 18:11:00 -04:00

28 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Mon, 11 Oct 2021 14:08:06 -0400
Subject: load v8 snapshot in browser process
https://chromium-review.googlesource.com/c/chromium/src/+/3183394
made a change to not load the v8 snapshot in the browser process,
but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index fceb9fb8fab9a2e93b224582b7dc4880987a0255..b14a4ad434241b9e8bd24135583935aee4b4df8e 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -293,11 +293,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
const std::string& process_type) {
- // The gpu does not need v8, and the browser only needs v8 when in single
- // process mode.
- if (process_type == switches::kGpuProcess ||
- (process_type.empty() &&
- !command_line.HasSwitch(switches::kSingleProcess))) {
+ // The gpu does not need v8
+ if (process_type == switches::kGpuProcess) {
return false;
}
return true;