electron/patches/chromium/load_v8_snapshot_in_browser_process.patch
electron-roller[bot] 37f8db15e9
chore: bump chromium to 137.0.7143.0 (main) (#46757)
* chore: bump chromium in DEPS to 137.0.7142.0

* chore: bump chromium in DEPS to 137.0.7143.0

* Add accelerator API to get shortcut vector representation

Refs 6442193

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-04-25 14:53:51 +09: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 24f6f89cfa430ed26476e1a3f79a8ed9464c45f3..a23d9b8fc451078708fd1a39f3d74357de7c244f 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -296,11 +296,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;