electron/patches/chromium/load_v8_snapshot_in_browser_process.patch
trop[bot] 03d83c293f
chore: bump chromium to 138.0.7154.0 (37-x-y) (#46894)
* chore: bump chromium in DEPS to 138.0.7152.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 138.0.7154.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* ozone/wayland: Fix bookmark dropdown right click context menu

6488801

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Use base::cstring_view in base::Environment

6494292

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Remove Add/Remove AXMode methods

6418444

xref: 6383275

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* build: update filenames.libcxx.gni

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Use base::cstring_view in base::Environment

6494292

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Use getters to expose NativePixmapHandle from GpuMemoryBufferHandle

6374406

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-02 10:08:04 -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 48363b920c780064a6d49f4a521b476bda5ac27b..d55c408557e15650897c9ed6d5b6bd83178a551f 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;