electron/patches/chromium/load_v8_snapshot_in_browser_process.patch
electron-roller[bot] 612da3ec47
chore: bump chromium to 135.0.7027.0 (main) (#45677)
* chore: bump chromium in DEPS to 135.0.7021.0

* chore: bump chromium in DEPS to 135.0.7023.0

* chore: update patches

* chore: gen-libc++-filenames.js

* [Extensions] Add a BUILD.gn file for the chrome.system.display API.

Refs 6227347

* chore: bump chromium in DEPS to 135.0.7025.0

* fixup! [Extensions] Add a BUILD.gn file for the chrome.system.display API.

* [DevTools] Add support for automatic workspace folders.

Refs 6275926

* Add UseCounter for potential PNA 2.0 breakage

Refs 6259197

* Remove references to NavigationEntry/Controller in Zoom code.

Refs 6258070

* chore: update patches

* Allow DevTools to record UmaHistogramMediumTimes

Refs 6183713

* chore: update patches

* [gpu] Remove unnecessary media_buildflags include

Refs 6286526

* chore: bump chromium in DEPS to 135.0.7027.0

* chore: update patches

* Remove type alias

Refs 6280957

* [Refactor] Make ExtensionRegistrar a browser keyed service.

Refs 6285230

* Remove unused functions

Refs 6278736

* chore: IWYU

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-02-21 14:46:51 -08: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 cefdfbba24ab6da7d12a94541c03b01a497e4036..68842f303c7ce77fedf8c7c0bc9824b52d0aac16 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;