electron/patches/chromium/load_v8_snapshot_in_browser_process.patch
electron-roller[bot] 9303a3fae9
chore: bump chromium to 135.0.7035.0 (main) (#45764)
* chore: bump chromium in DEPS to 135.0.7028.0

* chore: bump chromium in DEPS to 135.0.7029.0

* chore: bump chromium in DEPS to 135.0.7031.0

* chore: bump chromium in DEPS to 135.0.7033.0

* Split //component/embedder_support:browser_util into multiple targets

6246155

* chore: update patches

* build: update filenames.libcxx.gni

* 6275531: Enable Float16Array

6275531

* chore: bump chromium in DEPS to 135.0.7035.0

* chore: update patches

* Move Service Process Host files to a separate folder

6089368

* Remove NOTREACHED()s after return statements

6297811

* Move ServiceProcessTracker and UtilityProcessClient into separate files

6088677

* chore: update filenames.libcxx.gni

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-25 15:16:15 -05: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 82e5123e35509d22493809a37e56be5e9bea4264..054f38d683280638c7ac618d2ff8f7aef1a0def0 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -292,11 +292,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;